Click here for important information about

VBScript error - path not found

April 7, 2011 at 02:54:30
Specs: Windows XP
Good Morning,

I have a script to zip and copy a folder from a location to another location on the network. Unfortunately I'm getting a 'path not found' error. The problem is that the backup location is only accessible through a username and password. In fact, when I access the location through Windows Explorer, it prompts me for the username and password, and then when I run the script again the folder is copied successfully.

Since I'm not that good at programming with vbscript, can you help me how can I insert the username and password manually in the file, and what functions do I need to apply in this regard?

Thanks very much for your help!

See More: VBScript error - path not found

April 7, 2011 at 22:16:11
You'll need to map the drive using those credentials.
CreateObject("WScript.Network").MapNetworkDrive "", "\\someServer\someShare", _
  False, "someUser", "somePassword"

How To Ask Questions The Smart Way

Report •

April 8, 2011 at 02:59:27
Thanks Razor, I will try it out!

Report •

April 8, 2011 at 05:51:08
Hello Razor,

Thanks again, the solution worked perfectly.

By any chance, is there a way to insert the user and password in some other, more secure, way (e.g. encrypted) instead of simple plain text?

Thanks again.

Report •

Related Solutions

April 8, 2011 at 18:47:17
A better question, perhaps, would be to ask why you don't open up the share to whoever runs the script. That way you wouldn't need to have the alternate credentials out there at all.

How To Ask Questions The Smart Way

Report •

Ask Question