Sideway
output.to from Sideway
Draft for Information Only

Content

MS DOS Command: REPLACE.EXE
 Description
 Syntax
 Parameters
 Switches
 Related Command
 Examples

MS DOS Command: REPLACE.EXE

Reference from Microsoft MS-DOS cmd help

Description

Replaces files in a destination directory with files in a source directory that have the same name. You can also use REPLACE to add unique filenames to the destination directory.

Syntax

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

Parameters

[drive1:][path1]filename Specifies the location and name of the source file or set of files.
[drive2:][path2] Specifies the location of the destination file. You cannot specify a filename for files you replace. If you specify neither a drive nor a directory, REPLACE uses the current drive and directory as the destination.

Switches

/A Adds new files to the destination directory instead of replacing existing files. You cannot use this switch with the /S or /U switch.
/P /PPrompts you for confirmation before replacing a destination file or adding a source file.
/R Replaces read-only files as well as unprotected files. If you do not specify this switch but attempt to replace a read-only file, an error results and stops the replacement operation.
/S Searches all subdirectories of the destination directory and replaces matching files. You cannot use the /S switch with the /A switch. The REPLACE command does not search subdirectories specified in path1.
/W Waits for you to insert a disk before REPLACE begins to search for source files. If you do not specify /W, REPLACE begins replacing or adding files immediately after you press ENTER.
/U Replaces (updates) only those files on the destination directory that are older than those in the source directory. You cannot use the /U switch with the /A switch.

Related Command

For information about changing file attributes, see the ATTRIB command.

Examples

Suppose that several directories on drive C contain different versions of a file named PHONES.CLI, which contains client names and phone numbers. To replace all of these files with the latest version of the PHONES.CLI file from the disk in drive A, type the following command:

replace a:\phones.cli c:\ /s

Suppose you want to add new printer device drivers to a directory on drive C named TOOLS, which already contains several printer device-driver files for a word processor. To do this, type the following command:

replace a:*.prd c:\tools /a

This command searches the current directory on drive A for any files that have the extension .PRD and then adds these files to the TOOLS directory on drive C. Because the /A switch is included, REPLACE adds only those files from drive A that do not exist on drive C.


©sideway

ID: 110700248 Last Updated: 7/29/2011 Revision: 0


Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Travel 18

Reference 79

Computer

Hardware 254

Software

Application 213

Digitization 37

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 431

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Set 1

Logic 1

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2025 Sideway . All rights reserved Disclaimers last modified on 06 September 2019