thunderchicken
asked on
batch files, using xcopy or copy
I have a scheduled batch file that I want to copy a file to a network drive. The network drive requires a password. How do I supply it?
eg:
C:\>copy foo.txt \\blah\moo
Logon failure: unknown user name or bad password.
0 file(s) copied.
eg:
C:\>copy foo.txt \\blah\moo
Logon failure: unknown user name or bad password.
0 file(s) copied.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Go into the Start button > Programs > Accessories > System Tools > Scheduled Tasks. Double click your task to view the properties. At the Task tab there is a button that says Set Password. Click and enter the password. Also, the username should be a user that has permissions to access the share. It should be domain\username.