please dont rip this site
REPLACE+Replacing Selected Files

Allows you to copy or add files selectively to target drives

and directories.


PC-DOS 3.2+

MS-DOS equivalent: REPLACE (3.2+)




[d:][path] REPLACE [sd:][spath]sfilename

[td:][tpath] [P][R][W]


[d:][path] Specifies the drive letter and

directory that contain the

REPLACE command file.

[sd:][spath]sfilename Specifies the source file(s)

to be copied.

[td:][tpath] Specifies the target drive and


/A Copies all files from the

source that do not exist on

the target.

/P Prompts for each file


/D Copies only those files newer

than the files on the target.

/R Replaces read-only files on

the target.

/S Searches all the directories

on the target for files that

match the source file name.

/W Prompts for insertion of a

target disk before replacing


REPLACE allows you to selectively copy from a source disk

files that do not already exist on the target disk or copy files

that exist on both disks but are in an updated version on the

source disk.



copies all files in the root directory on drive B that are not

already in the REPORTS directory of drive C.


adds all files with a .TXT extension on drive A to the TEXT

directory on drive C if they are not there already. You will be

prompted to confirm each file to be copied.


copies only those files with a .TXT extension on drive A that are

newer than the files in the TEXT directory on drive C.


Add d:\path\filename?

Enter Y to add the file to the target.

No files added

All the files on the source already exist on the target. No

further action is required.

No files found

No files described in the argument were found on the source. No

further action is required.


The /A and /S options cannot be used together.


[For related topics, press R]


ATTRIB Command

COPY Command

DEL (DELETE) and ERASE Commands

DIR Command

PRINT Command

RENAME EN) Command

SHARE Command

TYPE Command

VERIFY Command

XCOPY Command

file: /Techref/dos/command/replace.htm, 3KB, , updated: 1999/2/20 11:24, local time: 2024/4/13 18:21,

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF=""> dos command replace</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.

Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

  PICList 2024 contributors:
o List host: MIT, Site host, Top posters @none found
- Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.

Welcome to!