tldr/pages/windows/xcopy.md

36 lines
908 B
Markdown
Raw Normal View History

2018-05-03 17:35:50 +01:00
# xcopy
> Copy files and directory trees.
- Copy the file(s) to the specified destination:
`xcopy {{path/to/file_or_directory}} {{path/to/destination}}`
2018-05-03 17:35:50 +01:00
- List files that will be copied before copying:
`xcopy {{path/to/file_or_directory}} {{path/to/destination}} /p`
2018-05-03 17:35:50 +01:00
- Copy the directory structure only, excluding files:
`xcopy {{path/to/file_or_directory}} {{path/to/destination}} /t`
2018-05-03 17:35:50 +01:00
- Include empty directories when copying:
`xcopy {{path/to/file_or_directory}} {{path/to/destination}} /e`
2018-05-03 17:35:50 +01:00
- Keep the source ACL in the destination:
`xcopy {{path/to/file_or_directory}} {{path/to/destination}} /o`
2018-05-03 17:35:50 +01:00
- Allow resuming when network connection is lost:
`xcopy {{path/to/file_or_directory}} {{path/to/destination}} /z`
2018-05-03 17:35:50 +01:00
- Disable the prompt when the file exists in the destination:
`xcopy {{path/to/file_or_directory}} {{path/to/destination}} /y`
2018-05-03 17:35:50 +01:00
- Display detailed usage information:
`xcopy /?`