"Invalid Switch" Error Message When Attempting to Use "Xcopy" or "Xcopy32" in MS-DOS Mode

Article translations Article translations
Article ID: 288320 - View products that this article applies to.
This article was previously published under Q288320
Expand all | Collapse all

On This Page


When you use switches with the xcopy or xcopy32 commands in MS-DOS mode after having chosen Command Prompt Only at the boot menu, or at a command prompt while using the Windows Millennium Edition (Me) Emergency Boot Disk (EBD), you may receive the following error message
Invalid switch - - /x
where x is the switch used, such as /H.


This behavior occurs when you use an unsupported switch with the xcopy or xcopy32 command. In the scenarios that are mentioned in the "Symptoms" section in this article, these commands support only a limited subset of switches.


To resolve this behavior, use only the supported switches when Windows starts. The supported switches are listed in the "More Information" section in this article.


Supported Switches

Collapse this tableExpand this table
/cContinues copying even if errors occur.
/iIf a destination does not exist while copying more than one file, this switch assumes that the destination must be a directory.
/qDoes not display file names while copying.
/fDisplays full source and destination file names while copying.
/lDisplays files that would be copied.
/hCopies all files including hidden and system files.
Note: This switch is only supported at the command prompt in Windows Me.
/rOverwrites read-only files.
/tCreates directory structure, but does not copy files. Does not include empty directories or subdirectories.
/uUpdates the files that already exist in destination.
/kCopies attributes. Normal xcopy will reset read-only attributes.
/yOverwrites existing files without prompting.
/-yPrompts you before overwriting existing files.
/nCopies by using the generated short names.

For a complete listing of switches that are available for xcopy and xcopy32, refer to the following article:
289483 Switches That You Can Use with Xcopy and Xcopy32 Commands


Article ID: 288320 - Last Review: January 31, 2007 - Revision: 1.4
  • Microsoft Windows Millennium Edition
  • Microsoft Windows 98 Standard Edition
  • Microsoft Windows 98 Second Edition
  • Microsoft Windows 95
kberrmsg kbprb KB288320

Give Feedback


Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com