NT Syntax


Replace or update one file with another

      REPLACE source_path_Name destination_path [/A] [/P] [/R] [/W]
REPLACE source_path_Name destination_path [/P] [/R] [/S] [/W] [/U]
key path : The folder where files are to be replaced.
/A : Add any missing files.
/P : Prompt for confirmation (each file)
/R : Replace even Read-only files
/S : Include all subfolders of the destination.
/W : Wait for you to insert a floppy disk.
/U : Replace (update) only files that are older than the source.


When replacing in all subdirectories (/S ) you cannot ADD files (/A) or restrict to replacing older files (/U)

Related Commands:

MOVE - Move files from one folder to another folder on the same drive
DEL - Delete one or more files
COPY - Copy one or more files to another location

Equivalent Linux BASH commands:

install - Copy files and set attributes

Simon Sheppard