Command: replace

  REPLACE replaces files in the destination directory with files from
  the source directory that have the same name.


  REPLACE [drive1:][path1]filename [drive2:][path2] [options]
          [drive1:][path1]filename  Specifies the source file or files.
          [drive2:][path2]          Specifies the directory where files
                                    are to be replaced.

[Main menu] [top] (Syntax) [Options] [Comments] [Examples] [See also] [File]


  /A  Adds new files to destination directory. Cannot use with /S or /U
  /H  Adds or replaces hidden and system files as well as unprotected
  /N  Preview mode - does not add or replace any file.
  /P  Prompts for confirmation before replacing a file or adding a source
  /R  Replaces read-only files as well as unprotected files.
  /S  Replaces files in all subdirectories of the destination directory.
      Cannot use with the /A switch.
  /W  Waits for you to insert a disk before beginning.
  /U  Replaces (updates) only files that are older than source files.
      Cannot use with the /A switch.
  /?  Shows the help.

[Main menu] [top] [Syntax] (Options) [Comments] [Examples] [See also] [File]


    0   No error. REPLACE successfully replaced or added the files.
    1   Function number invalid. The computer has a version of DOS that
        is incompatible with REPLACE. (Not implemented at the moment!)
    2   File not found. REPLACE could not find the source files.
    3   Path not found. REPLACE could not find the source or destination
    5   Access denied. The user does not have access to the source or
        destination files.
    8   Insufficient memory. There is insufficient system memory to carry
        out the command. (Not implemented because not possible to handle
        in a high level language like C!)
    11  Format invalid. The user used the wrong syntax on the command line.
    29  Write fault. REPLACE could not write the destination files.
    30  Read fault. REPLACE could not read the source files.
    39  Insufficient disk space. There is insufficient disk space in the
        destination path.

[Main menu] [top] [Syntax] [Options] (Comments) [Examples] [See also] [File]


  replace c:\newfiles\*.* c:\fdos\bin /P /U

[Main menu] [top] [Syntax] [Options] [Comments] (Examples) [See also] [File]

See also:


[Main menu] [top] [Syntax] [Options] [Comments] [Examples] (See also) [File]


  Please read this command's lsm file also.
  You will find the updated version (internet) here and
  the version described in this manual page here.
  The lsm file contains information about the name of the programmer,
  the download site, and some other command related information.

[Main menu] [top] [Syntax] [Options] [Comments] [Examples] [See also] (File)

  Copyright © 2001 Rene Ableidinger, updated 2007 by W. Spiegl.

  This file is derived from the FreeDOS Spec Command HOWTO.
  See the file H2Cpying for copying conditions.