0

Is there a way to copy to a network path to a folder that requires credentials using any copy commands without using net use.

Using xcopy you can achieve the goal across network path but I can not get it to take credentials

xcopy /E/R/K C:\folder\ \\XXX.XXX\folder\*.*

This is what I have tried and doesn't work along, with other similar inputs.

robocopy /e C:\folder\ "\\XXX.XXX\folder\ /user:name passwrd"
xcopy /E/R/K C:\folder\ "\\XXX.XXX\folder\*.* /user:name passwrd"

Thanks.

IntriquedMan
  • 223
  • 1
  • 7
  • 14
  • Used a work around, that doesn't break as often as mapping to an actual drive, just using net use //xxx.x.x.x and not assigning it to a lettered drive. – IntriquedMan Jun 05 '13 at 19:13

1 Answers1

1

The utilities don't have mechanisms to handle authentication. You will have to use net use or map the drive. Not sure why you don't want to use net use, but either way the drive will need to be authenticated before using the copy utilities. Maybe try using RunAs on the xcopy and use the credentials needed.

You can also do this in an AutoIt script wrapping the RunAs function in the command line.

Panama Jack
  • 24,158
  • 10
  • 63
  • 95
  • I appreciate it, I'll look into it and comment back if I can get anything that isn't too much of a work around working. – IntriquedMan Jun 04 '13 at 19:00