Link to home
Start Free TrialLog in
Avatar of mjelec
mjelec

asked on

batch copy folder

I am trying to figure out how to create a batch file script to copy a single folder example I have tried:

xcopy \\server\folder \\server\copied folder

I have received the following errors:

invalid path
too many parameters (fixed with quotations)
"CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory."

the last error has only shown up recently and i have not figured out where it has come from.

thanks in advance.
Avatar of knightEknight
knightEknight
Flag of United States of America image

use /e, and  put quotes around the source and destination:

xcopy/e  \\server\folder"  "\\server\copied folder"
Avatar of asdlkf
asdlkf

xcopy \\server\folder "\\server\copied folder"

copied folder has a space in it...
ASKER CERTIFIED SOLUTION
Avatar of knightEknight
knightEknight
Flag of United States of America image

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 mjelec

ASKER

too many parameters has already been fixed by the quotations

I tried xcopy/e and still received invalid path and the cmd.exe error messages
SOLUTION
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