Replace (command)

Last updated
replace
Developer(s) Microsoft, IBM, Digital Research, Paragon Technology, Rene Ableidinger, ReactOS Contributors
Initial release1986, 3637 years ago
Operating system MS-DOS, PC DOS, SISNE plus, OS/2, eComStation, ArcaOS, Windows, DR DOS, PTS-DOS, FreeDOS, ReactOS
Platform Cross-platform
Type Command
License MS-DOS, PC DOS, SISNE plus, OS/2, Windows, DR DOS, PTS-DOS: Proprietary commercial software
FreeDOS, ReactOS: GPLv2
Website docs.microsoft.com/en-us/windows-server/administration/windows-commands/replace

In computing, replace is a command that is used to replace one or more existing computer files or add new files to a target directory. Files with a hidden or system attribute set cannot be replaced using replace. The command lists all files that are replaced. [1]

Contents

History

The replace command first appeared in MS-DOS 3.2 [2] and has been included in most versions of MS-DOS and compatibles such as FreeDOS [3] and PTS-DOS. [4] DR DOS 6.0 includes an implementation of the replace command. [5] The FreeDOS version was developed by Rene Ableidinger and is licensed under the GPL. [6] It is also included as a console command in IBM OS/2, [7] Microsoft Windows, [8] and ReactOS. The ReactOS version was developed by Samuel Erdtman and is licensed under the GPL. [9]

Example

The following command updates the files in C:\delivery\ with the .exe files from C:\source\

C:\>replace "C:\source\*.exe" C:\delivery 

See also

Related Research Articles

<span class="mw-page-title-main">XCOPY</span> Computing command

In computing, XCOPY is a command used on IBM PC DOS, MS-DOS, IBM OS/2, Microsoft Windows, FreeDOS, ReactOS, and related operating systems for copying multiple files or entire directory trees from one directory to another and for copying files across a network.

<span class="mw-page-title-main">CHKDSK</span> System tool in DOS, OS/2 and Windows

In computing, CHKDSK is a system tool and command in DOS, Digital Research FlexOS, IBM/Toshiba 4690 OS, IBM OS/2, Microsoft Windows and related operating systems. It verifies the file system integrity of a volume and attempts to fix logical file system errors. It is similar to the fsck command in Unix and similar to Microsoft ScanDisk, which co-existed with CHKDSK in Windows 9x and MS-DOS 6.x.

more (command) Terminal pager available on various operating systems

In computing, more is a command to view the contents of a text file one screen at a time. It is available on Unix and Unix-like systems, DOS, Digital Research FlexOS, IBM/Toshiba 4690 OS, IBM OS/2, Microsoft Windows and ReactOS. Programs of this sort are called pagers. more is a very basic pager, originally allowing only forward navigation through a file, though newer implementations do allow for limited backward movement.

In computing, SUBST is a command on the DOS, IBM OS/2, Microsoft Windows and ReactOS operating systems used for substituting paths on physical and logical drives as virtual drives.

In computing, share is a command for DOS that allows software to perform file locks. Locking files became necessary when MS-DOS began allowing files to be accessed simultaneously by multiple programs, either through multitasking or networking.

tree (command)

In computing, tree is a recursive directory listing command or program that produces a depth-indented listing of files. Originating in PC- and MS-DOS, it is found in Digital Research FlexOS, IBM/Toshiba 4690 OS, PTS-DOS, FreeDOS, IBM OS/2, Microsoft Windows, and ReactOS. A version for Unix and Unix-like systems is also available.

<span class="mw-page-title-main">ATTRIB</span>

In computing, ATTRIB is a command in Intel ISIS-II, DOS, IBM OS/2, Microsoft Windows and ReactOS that allows the user to change various characteristics, or "attributes" of a computer file or directory. The command is also available in the EFI shell.

ren (command)

In computing, ren is a command in various command-line interpreters (shells) such as COMMAND.COM, cmd.exe, 4DOS, 4NT and Windows PowerShell. It is used to rename computer files and in some implementations also directories. It is analogous to the Unix mv command. However, unlike mv, ren cannot be used to move files, as a new directory for the destination file may not be used. Alternatively, move may be used if available. On versions of MS-DOS that do not support the move command, the user would simply copy the file to a new destination, and then delete the original file. A notable exception to this rule is DOSBox, in which ren may be used to move a file, since move is not supported.

ver (command)

In computing, ver is a command in various command-line interpreters (shells) such as COMMAND.COM, cmd.exe and 4DOS/4NT. It prints the name and version of the operating system, the command shell, or in some implementations the version of other commands. It is roughly equivalent to the Unix command uname.

find (Windows)

In computing, find is a command in the command-line interpreters (shells) of a number of operating systems. It is used to search for a specific text string in a file or files. The command sends the specified lines to the standard output device.

In computing, label is a command included with some operating systems. It is used to create, change, or delete a volume label on a logical drive, such as a hard disk partition or a floppy disk. Used without parameters, label changes the current volume label or deletes the existing label.

In some operating systems, vol is a command within the command-line interpreters (shells) such as COMMAND.COM and cmd.exe. It is used to display the volume label and volume serial number of a logical drive, such as a hard disk partition or a floppy disk, if they exist.

help (command) Command in various command line shells

In computing, help is a command in various command line shells such as COMMAND.COM, cmd.exe, Bash, qshell, 4DOS/4NT, Windows PowerShell, Singularity shell, Python, MATLAB and GNU Octave. It provides online information about available commands and the shell environment.

format (command)

In computing, format, a command-line utility that carries out disk formatting. It is a component of various operating systems, including 86-DOS, MS-DOS, IBM PC DOS and OS/2, Microsoft Windows and ReactOS.

choice (command)

In computing, choice is a command that allows for batch files to prompt the user to select one item from a set of single-character choices. It is available in a number of operating system command-line shells.

net (command)

In computing, net is a command in IBM OS/2, Microsoft Windows and ReactOS used to manage and configure the operating system from the command-line. It is also part of the IBM PC Network Program for DOS.

In computing, systeminfo, is a command-line utility included in Microsoft Windows versions from Windows XP onwards and in ReactOS.

In computing, recover is a primitive file system error recovery utility included in MS-DOS / IBM PC DOS versions prior to DOS 6.0 and a number of other operating systems.

comp (command)

In computing, comp is a command used on DEC OS/8, DOS, DR FlexOS, IBM OS/2, Microsoft Windows and related computer operating systems such as ReactOS. It is used to perform comparisons of multiple computer files to show the differences between them.

The command-line tool exe2bin is a post-compilation utility program available on MS-DOS and other operating systems.

References

  1. Replace - Windows CMD - SS64.com
  2. Wolverton, Van (2003). Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. Microsoft Press. ISBN   0-7356-1812-7.
  3. "FreeDOS 1.2 Updates Group - FreeDOS Base". Ibiblio.org. Retrieved 2022-09-08.
  4. "PTS-DOS 2000 Pro User Manual" (PDF). Buggingen, Germany: Paragon Technology GmbH. 1999. Archived (PDF) from the original on 2018-05-12. Retrieved 2018-05-12.
  5. DR DOS 6.0 User Guide Optimisation and Configuration Tips
  6. "FreeDOS 1.2 Updates Package - replace (FreeDOS Base)". Ibiblio.org. 2001-03-25. Retrieved 2022-09-08.
  7. "JaTomes Help - OS/2 Commands". www.jatomes.com. Archived from the original on 2019-04-14.
  8. Microsoft Windows XP - Replace
  9. "Reactos/Replace.c at master · reactos/Reactos". GitHub . 3 January 2022.

Further reading