2020-10-06 16:49:43 +01:00
|
|
|
# replace
|
|
|
|
|
|
|
|
> Replace files.
|
|
|
|
> See also: `robocopy`, `move`, `copy`, and `del`.
|
|
|
|
> More information: <https://docs.microsoft.com/windows-server/administration/windows-commands/replace>.
|
|
|
|
|
|
|
|
- Replace the destination file with the one from the source directory:
|
|
|
|
|
|
|
|
`replace {{path/to/file_or_directory}} {{path/to/destination}}`
|
|
|
|
|
|
|
|
- Add files to the destination directory instead of replacing existing files:
|
|
|
|
|
|
|
|
`replace {{path/to/file_or_directory}} {{path/to/destination}} /a`
|
|
|
|
|
|
|
|
- Interactively copy multiple files, with a prompt before replacing or adding a destination file:
|
|
|
|
|
|
|
|
`replace {{path/to/file_or_directory}} {{path/to/destination}} /p`
|
|
|
|
|
|
|
|
- Replace even read only files:
|
|
|
|
|
|
|
|
`replace {{path/to/file_or_directory}} {{path/to/destination}} /r`
|
|
|
|
|
|
|
|
- Wait for you to insert a disk before it replaces files (originally to allow inserting a floppy disk):
|
|
|
|
|
|
|
|
`replace {{path/to/file_or_directory}} {{path/to/destination}} /w`
|
|
|
|
|
2021-01-10 19:29:22 +00:00
|
|
|
- Replace all files in subdirectories of the destination:
|
2020-10-06 16:49:43 +01:00
|
|
|
|
|
|
|
`replace {{path/to/file_or_directory}} {{path/to/destination}} /s`
|
|
|
|
|
|
|
|
- Replace only files in the destination directory which are older than the files in the source directory:
|
|
|
|
|
|
|
|
`replace {{path/to/file_or_directory}} {{path/to/destination}} /u`
|
|
|
|
|
|
|
|
- Display detailed usage information:
|
|
|
|
|
|
|
|
`replace /?`
|