Files
cheatsheet-tldr/windows/xcopy
2024-02-21 11:19:49 +00:00

42 lines
1.1 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
syntax: markdown
tags: [tldr, windows]
source: https://github.com/tldr-pages/tldr.git
---
# xcopy
> Copy files and directory trees.
> More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/xcopy>.
- Copy the file(s) to the specified destination:
`xcopy {{path o ile_or_directory}} {{path o\destination_directory}}`
- List files that will be copied before copying:
`xcopy {{path o ile_or_directory}} {{path o\destination_directory}} /p`
- Copy the directory structure only, excluding files:
`xcopy {{path o ile_or_directory}} {{path o\destination_directory}} /t`
- Include empty directories when copying:
`xcopy {{path o ile_or_directory}} {{path o\destination_directory}} /e`
- Keep the source ACL in the destination:
`xcopy {{path o ile_or_directory}} {{path o\destination_directory}} /o`
- Allow resuming when network connection is lost:
`xcopy {{path o ile_or_directory}} {{path o\destination_directory}} /z`
- Disable the prompt when the file exists in the destination:
`xcopy {{path o ile_or_directory}} {{path o\destination_directory}} /y`
- Display help:
`xcopy /?`