Net use and Batch file
Posted on 2003-03-09
Weel, i want to do a batch file that does this:
for example i wil use the ip 192.168.0.1
the batch files checks the shares of this ip by doing
net view \\192.168.0.1
it gets the shares:
Now it will get in share c by doing:
net use x: \\192.168.0.1\c
Then it will copy a file that i have in c:\ to x:\ and to to all the subdirectories of x:\
after, it does: net use x: /delete
then it will get in share d and sharedocs and do the same thing.
My main problems in this is how it gets the shares and automaticly does net use x:\(SHARE), and how it gets all the subdirectoris in x:\.
Every awser are welcome and apreciated.
thks a lot