replace Command Examples

Replace files. See also: robocopy, move, copy, and del. More information: https://learn.microsoft.com/windows-server/administration/windows-commands/replace.

replace {{path\to\file_or_directory}} {{path\to\destination_directory}}

replace {{path\to\file_or_directory}} {{path\to\destination_directory}} /a

replace {{path\to\file_or_directory}} {{path\to\destination_directory}} /p

replace {{path\to\file_or_directory}} {{path\to\destination_directory}} /r

replace {{path\to\file_or_directory}} {{path\to\destination_directory}} /w

replace {{path\to\file_or_directory}} {{path\to\destination_directory}} /s

replace {{path\to\file_or_directory}} {{path\to\destination_directory}} /u

replace /?