Dos Prompt Home Page Command Prompt Reference
REPLACE

Replaces files.

REPLACE [drive1:][path1]filename [drive2:][path2] [/A] [/P] [/R] [/W]
REPLACE [drive1:][path1]filename [drive2:][path2] [/P] [/R] [/S] [/W] [/U]

[drive1:][path1]filename             Specifies the source file or files.
[drive2:][path2]                         Specifies the directory where files are to be replaced.
/A                                             Adds new files to destination directory. Cannot use with /S or /U switches.
/P                                             Prompts for confirmation before replacing a file or adding a source file.
/R                                             Replaces read-only files as well as unprotected files.
/S                                             Replaces files in all subdirectories of the destination directory. Cannot use with the /A switch.
/W                                            Waits for you to insert a disk before beginning.
/U                                            Replaces (updates) only files that are older than source files. Cannot use with the /A switch.

Examples

 

Associated Commands

ROBOCOPY

 

Top of the Page - Command Prompt Reference Home Page
Last Page Update: 08/03/2012

© Sembee Ltd. 1998 - 2016.

Reproduction of any content on this web site is prohibited without express written consent. Use of this web site is subject to our terms and conditions.

All trademarks and registered trademarks are property of their respective owners. This site is not endorsed or recommended by any company or organisation mentioned within and is to provide guidance only and as such we cannot be held responsible for any consequences of following the advice given.

Sembee Ltd. is registered in England and Wales at 1 Carnegie Road, Newbury, Berkshire, RG14 5DJ.
Registered company number: 4704428. VAT Number GB 904 5603 43.

Server 1