XCOPY giving Invalid Switch error
Posted on 2006-06-21
Trying to run the following XCOPY command from a batch file on my Win98se boot floppy booted with CD-Rom Support to copy the win98 folder from my CD to 2nd hard drive partition (D:\).
xcopy G:\win98 D:\WIN98 /S /W /I /F /H
It works perfectly well from within Windows, but from the boot floppy DOS Mode I receive the following error:
Invalid switch - - /F
I've tried the switches as lower and uppercase (shouldn't make any difference apart from the fact that it just reflects this in the error message), and tried them in every permutation (ie. order) after the <source> and <dest> parameters. I've also tried providing the directories with trailing backslashes.
If I leave out one of the switches, it jumps to the next and tells me that is invalid.
The strange thing is that XXCOPY (which uses mostly the same switches) is also giving me an "invalid switch" error when trying to perform the same folder copy.
XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/W] [/C] [/I] [/Q] [/F] [/L] [/H] [/R] [/T] [/U] [/K] [/N]
Presumably that's the recommended order that the switches should be used, or else they would have been shown alphabetically.
/S Copies directories and subdirectories except empty ones.
/W Prompts you to press a key before copying.
/I If destination does not exist and copying more than one file, assumes that destination must be a directory.
/F Displays full source and destination file names while copying.
/H Copies hidden and system files also.
Have I overlooked something blatantly obvious here?
I've usd XCOPY on numerous previous occasions with full success.