Type: External (3.2 and later)
REPLACE [d:][path]filename [d:][path][/A][/P][/R][/S][/U][/W]
Purpose: Replaces stored files with files of the same name from a
different storage location.
This command replaces files in the target path designation with files of
same name in the source location.
You can use wildcard characters (? and *) to indicate groups of filenames
source directories. You cannot use this command to replace hidden files
As files are replaced, the program displays their filenames on the
After the replace operation is complete, it displays
n file(s) added/replaced
After this command terminates, it sets one of the following exit codes:
0 - Command completed successfully
1 - Command line error
2 - File not found
3 - Path not found
5 - Access denied
8 - Insufficient memory available
15 - Invalid drive
/A - Adds files specified by the source path designation that DO NOT
the target path designation. By using this option, you can selectively
files to a directory: a file in the source path designation that has the
name as a file on the target designation will not be affected.
This option cannot be used in combination with the /S option.
/P - Displays a prompt before each file is replaced allowing you to
on a file-by-file basis whether or not to allow the replacement.
/R - Replaces both read-only and unprotected files on the target
Without this option, any attempt to REPLACE a read-only file will result
error message and the replacement process will terminate.
/S - Acts both on the target directory and all subdirectories within
target directory. You cannot use the /A option together with this
/U - Replaces files on the target drive or directory that are older
their counterparts on the source drive.
/W - Waits for you to insert a disk before starting the replacement
To replace all copies of the file MAIN.EXE on all directories within the
directory of drive C with a file of the same name that is stored in the
directory on drive A, enter
a: \special\main.exe c:\/s
To add all files from the NEWFILES directory on drive A that have the
filename extension to the FILES directory on drive C (as long as no file
same name already exists there), enter
Back to the