@ENUMSHARES |
@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-1 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,\\LINKSTATION\*]
\\LINKSTATION\info
for %i in (0 1 2) echo %@enumshares[%i,\\LINKSTATION\*]
\\LINKSTATION\info
\\LINKSTATION\share
\\LINKSTATION\archive