Link to home
Start Free TrialLog in
Avatar of thunderchicken
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.
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of craylord
craylord

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.