Reputation: 377
From inside a .bat file, I m issuing this command
xcopy\s Folder1\folder2\folder3\blah-blah Folder1\temp\folder2\folder3
But I get the error: The system cannot find the path specified.
I tried copying the same line to command line and tried it: Then, I get the error, xcopys command not found. If I try to use xcopy instead of xcopy/s, I get error:
File not found - Folder1folder2folder3blah-blah
If I use xcopy command with backward slash on command line: Invalid number of parameters.
I tried enclosing paths in quotes, but it does not help. My file names don't have spaces in them but they do have -
I have checked the path of source and destination and they exist
Any help will be appreciated.
Thanks
Upvotes: 2
Views: 3880
Reputation: 17185
I guess you're running under windows, so you have to use forward slashes for arguments.
xcopy/s
is something very different from xcopy\s
. The later searches for an application called s
in a subfolder called xcopy
. To further avoid confusion, separate the program from its argument(s) with spaces.
Upvotes: 3