xcopy


xcopy \ windows \system32\xcopy.exe

xcopy works like copy , but provides more options, works with multiple directories, and is often faster. The xcopy32 options are:

 xcopy   source   [   destination   ] [/a  /m] [/d[:   date   ]] [/p]     [/s [/e]] [/v] [/w] [/c] [/i] [/q] [/f] [/l] [/g] [/h]     [/r] [/t] [/u] [/k] [/n] [/o] [/x] [/y] [/-y] [/z]     [/exclude:   filenames   ] 

Option

Description

source

Specifies the file(s) to copy; source must include the full path .

destination

Specifies the location and/or names of new files. If omitted, files are copied to the current directory.

/a

Copies files with the archive attribute set, but doesn't change the attribute of the source file (similar to /m ).

/c

Continues copying even if errors occur.

/d: date

Copies only files changed on or after the specified date. If no date is given, copies only those source files that are newer than existing destination files.

/e

Copies all directories and subdirectories (everything), including empty ones (similar to /s ). May be used to modify /t .

/exclude: filenames

Specifies a file (or a list of files) containing strings of text (each on its own line). When any of the strings match any part of the absolute path of the file to be copied, that file will be excluded from being copied. Contrary to what you might expect, filenames does not actually list the filenames to exclude.

/f

Displays full paths while copying (unless /q is specified); normally, only filenames are displayed.

/h

Allows the copying of encrypted files to destination that does not support encryption; otherwise , such files are skipped .

/h

Copies hidden and system files also; normally files with the hidden or system attributes are skipped.

/i

If a destination is not supplied and you are copying more than one file, assumes that the destination must be a directory. (By default, xcopy asks if the destination is a file or directory.)

/k

Duplicates the attributes of the source files; by default, xcopy turns off the read-only attributes.

/l

Displays files that would be copied given other options, but does not actually copy the files.

/m

Copies files with the archive attribute set, then turns off the archive attribute of the source file (similar to /a ).

/n

Copies files using short (8.3) file and directory names (for example, PROGRA~1 instead of Program Files). Use this feature to convert an entire branch of files and folders to their short names.

/o

Copies file ownership and ACL information.

/p

Prompts you before creating each destination file.

/q

Quiet mode; does not display filenames while copying.

/r

Overwrites read-only files.

/s

Copies directories and subdirectories, except empty ones (similar to /e ).

/t

Creates the directory structure, but does not copy files; does not include empty directories unless /e is specified.

/u

Copies from the source only files that already exist on destination; used to update files.

/v

Verifies copied files by comparing them to the originals .

/w

Prompts you to press a key before copying (useful in batch files).

/x

Copies file audit settings (implies /o ).

/y , /-y

Suppress or enable prompting, respectively, to confirm replacing existing files.

/z

Copies networked files in restartable mode.

Examples

Copy all the files and subdirectories, including any empty subdirectories and hidden files, from c:\foobar to the root directory of d:

 C:\>  xcopy \foobar d: /s /e /h  


Windows XP Pocket Reference
Windows XP Pocket Reference
ISBN: 0596004257
EAN: 2147483647
Year: 2001
Pages: 154
Authors: David A. Karp

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