Skip to content

Instantly share code, notes, and snippets.

@lazidoca
Created September 15, 2021 03:15
Show Gist options
  • Save lazidoca/36d8c0e332f5a428c836b10bb3510245 to your computer and use it in GitHub Desktop.
Save lazidoca/36d8c0e332f5a428c836b10bb3510245 to your computer and use it in GitHub Desktop.
Windows xcopy cheatsheets

Windows xcopy cheatsheets

Copy the file(s) to the specified destination:

xcopy {{path/to/file_or_directory}} {{path/to/destination}}

List files that will be copied before copying:

xcopy {{path/to/file_or_directory}} {{path/to/destination}} /p

Copy the directory structure only, excluding files: xcopy {{path/to/file_or_directory}} {{path/to/destination}} /t

Include empty directories when copying: xcopy {{path/to/file_or_directory}} {{path/to/destination}} /e

Keep the source ACL in the destination:

xcopy {{path/to/file_or_directory}} {{path/to/destination}} /o

Allow resuming when network connection is lost:

xcopy {{path/to/file_or_directory}} {{path/to/destination}} /z

Disable the prompt when the file exists in the destination:

xcopy {{path/to/file_or_directory}} {{path/to/destination}} /y

Display detailed usage information:

xcopy /?
tldr Wind

Refer: Windows xcopy cheatsheets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment