tldr/pages/windows/xcopy.md

37 lines
1.1 KiB
Markdown
Raw Normal View History

2018-05-03 17:35:50 +01:00
# xcopy
> Copy files and directory trees.
> More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/xcopy>.
2018-05-03 17:35:50 +01:00
- Copy the file(s) to the specified destination:
`xcopy {{path\to\file_or_directory}} {{path\to\destination_directory}}`
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_directory}} /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_directory}} /t`
2018-05-03 17:35:50 +01:00
- Include empty directories when copying:
`xcopy {{path\to\file_or_directory}} {{path\to\destination_directory}} /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_directory}} /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_directory}} /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_directory}} /y`
2018-05-03 17:35:50 +01:00
- Display detailed usage information:
`xcopy /?`