Gfsd
asked on
Net use and Batch file
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:
c
d
sharedocs
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
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:
c
d
sharedocs
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
You really earned this points, thinks a lot
I don't know about this one.
You want to enumerate the shares of a series of remote machines, then connect to each share, then copy a file to every subdirectory of that share?
Why? That sounds like a hellova virus delivery system.
pb