G
Guest
What I want to do is pick out the directory names in the users folder and
then share them. I have done this in the past by creating a Text file and
using it for input, but it seems to me I should be able to skip that step.
Here is my original batch file;
for /F "usebackq delims==" %%I in (users.txt) do Call :begin %%I
goto :EOF
:begin
set USER=%1
::Share Dir
net share %user%$=I:\users\%user% /Grant:Everyone,Full
I create users.txt by running dir /b *. >users.txt
seems like "FOR /R [[drive:]path] %variable IN (set) DO command
[command-parameters]" should work, but I can't figure out what to put in
(set).
TIA,
Mike
then share them. I have done this in the past by creating a Text file and
using it for input, but it seems to me I should be able to skip that step.
Here is my original batch file;
for /F "usebackq delims==" %%I in (users.txt) do Call :begin %%I
goto :EOF
:begin
set USER=%1
::Share Dir
net share %user%$=I:\users\%user% /Grant:Everyone,Full
I create users.txt by running dir /b *. >users.txt
seems like "FOR /R [[drive:]path] %variable IN (set) DO command
[command-parameters]" should work, but I can't figure out what to put in
(set).
TIA,
Mike