I'm just trying to run a simple batch script to copy a file:
xcopy /s c:\source\document.txt c:\destination
Nothing is copied, and I get the response:
0 File(s) copied
I've done this before and it's worked fine. I don't understand the problem.
22 Answers
You are specifying paramter /s, which means: Copy this folder and subfolders, but your source is a file, not a folder.
Due to /s, the source is assumed to be a folder, but it actually is not.
Remove the /s paramter, and all should work fine.
If you indeed want to copy that folder AND all subfolders, remove the filename and only specify the folder, followed by *.*
3I determined that all the files I was trying to copy were hidden files, so the only way Xcopy will copy them is by adding the /h option, which solved the problem!