Site hosted by Angelfire.com: Build your free website today!

MS-DOS External Commands

The REPLACE Command

Description:

Replaces files.

Command Syntax:

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

Explanation of Syntax:

[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.

Command Use:

This command can be used at the command prompt and in batch files.