REPLACE


Replaces files in the destination folder with files in the source folder that have the same name. It also can be used to add files to the destination folder that don’t already exist there. For example, if you need to make sure that all files on an optical disc have been copied to a folder on the hard drive, you could use another method to copy them again, and then get the prompt to overwrite existing files. Using REPLACE with the /a switch automatically copies only files that don’t exist on the destination folder while ignoring those files that do exist there.

Use

To replace files or folders, type “REPLACE” followed by the path to the source files or folders, then the destination files or folders, followed by any appropriate switches. You can also navigate to the source folder before running the command. If you specify neither a source nor a destination folder, the current folder is used.

Switches

/a: Adds only files to the destination folder that aren’t there already; /a cannot be used at the same time as the /s or /u switches.

/p: Prompts you for confirmation before replacing or adding a file or folder.

/r: Replaces read-only, hidden, or system files or folders. Files or folders in the destination folder with these attributes normally would cause the operation to stop.

/w: Waits for you to insert a disk before searching for source files or folders. Without this switch, REPLACE attempts to replace or add files immediately after the user presses <ENTER>.

/s: Includes subfolders of the destination folder (not the source folder); /s cannot be used at the same time as the /a switch.

/u: Replaces only those files in the destination folder that are older than those with the same names in the source folder; /u cannot be used at the same time as the /a switch, nor can it be used to update hidden or system files. You’ll have to remove these attributes first, using the ATTRIB command or the Windows interface.




The A+ Certification & PC Repair Handbook
The A+ Certification & PC Repair Handbook (Charles River Media Networking/Security)
ISBN: 1584503726
EAN: 2147483647
Year: 2003
Pages: 390

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net