snippetbashTip
replace — Replace files. See also: `robocopy`, `move`, `del`. More information: <https://learn.microsoft.com/w
Viewed 0 times
commandfilesclirobocopyreplaceseealso
windows
Problem
How to use the
replace command: Replace files. See also: robocopy, move, del. More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/replace>.Solution
replace — Replace files. See also: robocopy, move, del. More information: <https://learn.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_directory}}Add files to the destination directory instead of replacing existing files:
replace {{path\to\file_or_directory}} {{path\to\destination_directory}} /aInteractively copy multiple files, with a prompt before replacing or adding a destination file:
replace {{path\to\file_or_directory}} {{path\to\destination_directory}} /pReplace even read only files:
replace {{path\to\file_or_directory}} {{path\to\destination_directory}} /rWait 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_directory}} /wReplace all files in subdirectories of the destination:
replace {{path\to\file_or_directory}} {{path\to\destination_directory}} /sReplace 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_directory}} /uDisplay help:
replace /?Code Snippets
Replace the destination file with the one from the source directory
replace {{path\to\file_or_directory}} {{path\to\destination_directory}}Add files to the destination directory instead of replacing existing files
replace {{path\to\file_or_directory}} {{path\to\destination_directory}} /aInteractively copy multiple files, with a prompt before replacing or adding a destination file
replace {{path\to\file_or_directory}} {{path\to\destination_directory}} /pReplace even read only files
replace {{path\to\file_or_directory}} {{path\to\destination_directory}} /rWait 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_directory}} /wContext
tldr-pages: windows/replace
Revisions (0)
No revisions yet.