Home » IT & Tech Blogs » Information Technology » Windows hangs when copying files – XCOPY

Windows hangs when copying files – XCOPY

If you are encountering Windows reboots, crashing, errors, or if Windows hangs when trying to copy files, use the XCOPY command with these switches to copy everything, including empty folders, hidden files, system files, etc.


Where A is the drive letter of the source directory and B is the letter of the destination directory.

More Switches:


Copies only files with the archive attribute set, doesn’t change the attribute.


Copies only files with the archive attribute set, turns off the archive attribute.


Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.

/EXCLUDE:file1 [+file2][+file3]…

Specifies a list of files containing strings. When any of the strings match any part of the absolute path of the file to be copied, that file will be excluded from being copied. For example, specifying a string like obj or .obj will exclude all files underneath the directory obj or all files with the .obj extension respectively.


Prompts you before creating each destination file.


Copies directories and subdirectories except empty ones.


Copies directories and subdirectories, including empty ones. Same as /S /E. May be used to modify /T.


Verifies each new file.


Prompts you to press a key before copying.


Continues copying even if errors occur.


If destination does not exist and copying more than one file, assumes that destination must be a directory.


Does not display file names while copying.


Displays full source and destination file names while copying.


Displays files that would be copied.


Copies hidden and system files also.


Overwrites read-only files.


Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. /T /E includes empty directories and subdirectories.


Copies only files that already exist in destination.


Copies attributes. Normal Xcopy will reset read-only attributes.


Copies using the generated short names.


Copies file ownership and ACL information.


Copies file audit settings (implies /O).


Suppresses prompting to confirm you want to overwrite an existing destination file.


Causes prompting to confirm you want to overwrite an existing destination file.


Copies networked files in restartable mode.

More Information on XCOPY

Another free method to sync or copy files

Thank you for reading IT Blog

Check Also

5 Tips for Getting Great Technical Support

Running a small business has never been easier, due to the accessibility of great tools …

One comment

  1. This worked for me on xp and more effective than sync software! Thanks!

Information Technology Blog

Accessibility Tools