|
|
@ENUMSHARES[n,\\server\shares] : Enumerate the share names for the specified server. n is the entry number in the list of shares (the first one is 0). server is the server name, and shares is the sharename(s) to match. Shares may contain wildcards. Returns a null string If there are fewer than n matching shares. This function can be repeatedly called, incrementing n each time to enumerate all available shares until it returns a null string.
If the n is -1, @ENUMSHARES returns the number of matching sharenames.
Examples:
echo %@enumshares[0,\\SERVR\DRIVE_C]
for %i in (0 1 2) echo %@enumshares[%i,\\SERVER\DRIVE_*]