replace (command)

{{lowercase title}}

{{Infobox software

| name = replace

| logo =

| screenshot = ReactOS-0.4.13 replace command 667x482.png

| screenshot size =

| caption = The ReactOS replace command

| developer = Microsoft, IBM, Digital Research, Paragon Technology, Rene Ableidinger, ReactOS Contributors

| released = {{Release year|df=yes|1986}}

| latest release version =

| latest release date =

| operating system = MS-DOS, PC DOS, SISNE plus, OS/2, eComStation, ArcaOS, Windows, DR DOS, PTS-DOS, FreeDOS, ReactOS

| platform = Cross-platform

| genre = Command

| license = MS-DOS, PC DOS, SISNE plus, OS/2, Windows, DR DOS, PTS-DOS: Proprietary commercial software
FreeDOS, ReactOS: GPLv2

| website = {{URL|https://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.[https://ss64.com/nt/replace.html Replace - Windows CMD - SS64.com]

History

The replace command first appeared in MS-DOS 3.2{{Cite book|author-last=Wolverton|author-first=Van|title=Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition|date=2003|publisher=Microsoft Press|isbn=0-7356-1812-7}} and has been included in most versions of MS-DOS and compatibles such as FreeDOS{{cite web|url=http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/group-base.html |title=FreeDOS 1.2 Updates Group - FreeDOS Base |publisher=Ibiblio.org |date= |accessdate=2022-09-08}} and PTS-DOS.

{{cite web |title=PTS-DOS 2000 Pro User Manual |publisher=Paragon Technology GmbH |location=Buggingen, Germany |date=1999 |url=http://download.paragon-software.com/doc/manual_dos_eng.pdf |access-date=2018-05-12 |url-status=live |archive-url=https://web.archive.org/web/20180512094512/http://download.paragon-software.com/doc/manual_dos_eng.pdf |archive-date=2018-05-12}} DR DOS 6.0 includes an implementation of the {{code|replace}} command.[https://www.4corn.co.uk/archive/docs/DR%20DOS%206.0%20User%20Guide-opt.pdf DR DOS 6.0 User Guide Optimisation and Configuration Tips] The FreeDOS version was developed by Rene Ableidinger and is licensed under the GPL.{{cite web|url=http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/replace.html |title=FreeDOS 1.2 Updates Package - replace (FreeDOS Base) |publisher=Ibiblio.org |date=2001-03-25 |accessdate=2022-09-08}} It is also included as a console command in IBM OS/2,{{cite web |url=http://www.jatomes.com/Help/Os2Cmd.php#REPLACE |title=JaTomes Help - OS/2 Commands |website=www.jatomes.com |url-status=dead |archive-url=https://web.archive.org/web/20190414130029/http://www.jatomes.com/Help/Os2Cmd.php |archive-date=2019-04-14}} Microsoft Windows,[https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb490988(v%3dtechnet.10) Microsoft Windows XP - Replace] and ReactOS. The ReactOS version was developed by Samuel Erdtman and is licensed under the GPL.{{cite web|url=https://github.com/reactos/reactos/blob/master/base/shell/cmd/replace.c|title = Reactos/Replace.c at master · reactos/Reactos|website = GitHub|date = 3 January 2022}}

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

References

{{Reflist}}

Further reading

  • {{Cite book|author-last=Cooper|author-first=Jim|title=Special Edition Using MS-DOS 6.22, Third Edition|date=2001|publisher=Que Publishing|isbn=978-0789725738}}
  • {{Cite book|author-last=Dyson|author-first=Peter|year=1995|title=Mastering OS/2 Warp|publisher=Sybex|isbn=978-0782116632}}
  • {{Cite book|author=John Paul Mueller|year=2007|title=Windows Administration at the Command Line for Windows Vista, Windows 2003, Windows XP, and Windows 2000|publisher=John Wiley & Sons|isbn=978-0470165799}}