Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with WshShell.run 1

Status
Not open for further replies.

TheNewOne

Technical User
Joined
Mar 27, 2004
Messages
117
Location
SI
Hi forum. I have a problem.I would like to make a folder in network share. Folder must have a name of the comuter from wich script is runing. I trie with this:

set wshShell = CreateObject("wscript.shell")
wshShell.run("md \\myshare\%computername%"),1 , True

but Im getting an error with code 80070002 (The sistem cannot find the file specified). If i put this command in CMD-line it works, but i dont have any idea why this command doesen't work in my script. Thx for any help

Jure
 
Have you tried this ?
wshShell.run "CMD /C md \\myshare\%computername%", 1, True


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
THx PHV for your adwice, script works fine, Thx again for your time
 
oh, I have another problem. I would like to copy some files from local machin to that folder on network share. Any idea how could i do that?? I need that script to backup some files from computers in our organization.

thx, Jure
 
Please, for each new question start a new thread.
Anyway do a keyword search in this forum for fso copy network

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top