Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
August 19, 2004
If you open a CMD.EXE window, and type RMTShare \ServerNameShareName, like rmtshare \jsi001Users, you receive a display similar to:
Share name \jsi001UsersPath D:UsersRemarkMaximum users No limitUsers 7Permissions: Everyone : FULL CONTROLThe command completed successfully.
To extract the number of users in a batch file, use:
for /f "Tokens=1,2" %%t in ('RMTShare \ServerNameShareName^|FIND "Users"') do ( if "%%t" EQU "Users" set /a conusers=1000000%%u%%1000000)
In this example, the conusers numeric environment variable will be set to 7.
NOTE: The exact case of Users is required.
You May Also Like