Replace (command)
In the realm of computing, the replace command serves to update or insert files within a specified directory. It is important to note that this command does not support overwriting files marked with hidden or system attributes, and it provides a list of all files that have been replaced.
History
Introduced with MS-DOS version 3.2, the replace command has been a component of most MS-DOS releases as well as compatible operating systems such as FreeDOS and PTS-DOS. Additionally, replace is implemented in DR DOS 6.0. The FreeDOS variant, created by Rene Ableidinger, is distributed under the GPL license. This command is also accessible as a console utility in IBM's OS/2, Microsoft Windows, and ReactOS. The ReactOS implementation, developed by Samuel Erdtman, is likewise GPL-licensed.
Example
The command below demonstrates how to refresh files located in C:\delivery\ by copying all .exe files from C:\source\:
<syntaxhighlight lang="doscon"> C:\>replace "C:\source\*.exe" C:\delivery </syntaxhighlight>