What is replace Command in Windows Server 2008

In this article I am going to explain about replace command in windows server 2008 operating system.
  • 1634

Replace command in Windows Server 2008

The replace command is used to replace files and whenever you are using the /a option, replace adds new files to a directory instead of replacing existing files.

Syntax of Replace command

replace[<Drive1>] <Path1> <filename>  [<Drive2>] <Path2>[a] [/p] [/r] [/w] [/u]

Parameters in Replace command

It contains following parameter, which is given below:
Parameter Description
 [<Drive1>] <Path1> <filename> It specifies the location and name of the source file or set of files.
 [<Drive2>] <Path2> It specifies the location of the destination file.
/a It add new file to the destination directory instead of replacing existing files.
/p It prompts you for confirmation before replacing a destination file or adding a source file.
/r It is used to replaces Read-only and unprotected files.
/w It wait for you to insert a disk before the search for source files begins.
/s It searches all subdirectories in the destination directory and replaces matching files.
/u It replaces only those files on the destination directory that are older than those in the source directory,

Example of Replace command

replace e:\abc.exe d:\ /s



Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here


More Articles

© 2020 DotNetHeaven. All rights reserved.