Sie sind auf Seite 1von 16

From: Kan Yabumoto tech@xxcopy.

com
To: XXCOPY user
Subject: XXCOPY Command Reference Alphabetic Listing
Date: 2007-03-10 Revised for ver 2.95.1
====================================================================

This article lists XXCOPY's command switches in alphabetic order.


For a functional classification of the command switch, see XXTB #27.

/? Shows a summary of the switches on one page.


... /? Shows related switches when entered with other switches.

/0 Disables DATMAN One-pass copy (not recommended, but allowed).


/1 DATMAN One-pass copy (when copying from DATMAN tape, default).

/A Same as /ATA. Copies files with the archive attribute set.


Doesn't change the attribute.

/A0 Ignores the archive attribute bit and does not change it.

/AA Sets the src file archive bit (without actually copying).

/AC Copies specified files irrespective of the archive attribute.


Turns off the archive attribute after XXCOPY is done.

/AN<mask> Sets a new value to file attribute bits (replace the value).
The <mask> value is a combination of letters, AHSRC.

/AR<mask> Resets file attribute bits (clears specified bits).

/ARD<mask> Resets directory attribute bits (clears specified bits).

/AS<mask> Sets file attribute bits (sets specified bits).

/ASD<mask> Sets directory attribute bits (sets specified bits).

Note: The <mask> value for /AR and /AS specifies attributes (AHSRC)
whose bits are either reset or set respectively to the existing
file attributes. Unspecified attributes bits are kept unchanged.

/ARD and /ASD work on directories analogous to /AR and /RS.

/AT<mask> Selects files by the attribute bits (AHSRC).


You may use two or more /AT<mask> switches to specify multiple
attributes required. E.g., /ATA/ATH qualifies files with both
the A(rchive) bit and the H(idden) bits.
Or, you may use one /AT<mask> switch with multiple letters to
select alternative attribute bits to select files. E.g.,
/ATAH qualifies a file which has either A-bit, H-bit or both.

/AX<mask> Excludes files with the specified attribute bits (AHSRC).


You may use two or more /AX<mask> switches to specify
attribute bits to exclude files for file operations. E.g.,
/AXA/AXH excludes files with A-bit, H-bit, or both.
Or, you may use one /AX<mask> switch with multiple letters to
exclude files with only the specified combination of attribute
bits. E.g., /AXAH excludes files with both A-bit and H-bit.

Note: The /AT<mask> and /AX<mask> switches have opposite conjugation


rules (the effects of combining attribute bits --- AND and OR).

/AZ Clears the src file archive bit (without actually copying).

Note: The /AA, /AN, /AR, /AS, /ARD, /ASD and /AZ switches modify the
file attributes without copying the files to the destination,
whereas the /A, /AT and /AX switches select files by the file
attributes for various operations (copy, list, remove, etc.).

/B0 Undo any of /BI, /BB, /BN, /Bo, /BX, or /BZ switches.

/BB Backs up brand new files only (does not overwrite existing ones).

/BE Backs up exactly the same files(includes brand new files).

/BI Backs up incrementally, different (by time/size) files only.

/BN Backs up newer files only (includes brand new files).

/Bo Backs up older files only (includes brand new files).

/BS Selects exactly the same files (this is useful with /RS).

/BU Standard Backup switch (same as /r/i/bi/q/c/h/e/v/y).

/BX Backs up different-date files (includes brand new files).

/BZ Same as /BZX.

/BZE Backs up equal-size files (includes brand new files).

/BZS Backs up smaller-size files (includes brand new files).

/BZL Backs up larger-size files (includes brand new files).

/BZX Backs up different-size files (includes brand new files).

/BACKUP Standard Backup without deleting any file (/CLONE without /ZY).
A shortcut for the following combination: /KS/H/E/R/Q/Y/BI/ZE/oD0.

/C Continues copying even if errors occur (default).

/C0 Disables the /C switch (terminates upon error).

/CA Enables all cache. Same as /CA7 (default).


/CA0 Cache control: src-rd = OFF dst-wr = OFF dst-rd = OFF
/CA1 Cache control: src-rd = OFF dst-wr = OFF dst-rd = ON
/CA2 Cache control: src-rd = OFF dst-wr = ON dst-rd = OFF
/CA3 Cache control: src-rd = OFF dst-wr = ON dst-rd = ON
/CA4 Cache control: src-rd = ON dst-wr = OFF dst-rd = OFF
/CA5 Cache control: src-rd = ON dst-wr = OFF dst-rd = ON
/CA6 Cache control: src-rd = ON dst-wr = ON dst-rd = OFF
/CA7 Cache control: src-rd = ON dst-wr = ON dst-rd = ON
/CL Legacy switch, replaced by /CA

/CB Continues batch file if XXCOPY ended OK last time.

/CBQ Same as /CB except suppresses console output to end immediately.

/CB0 Cancels the /CB and /CBQ switches.

/CC Warns a cyclic copy with a Y/N prompt.

/CC0 Disallows cyclic copy (src includes the dst directory) (default).

/CCY Allows a cyclic copy by excluding the destination from the src.

/CE Same as /CBQ/EC (most useful in batch file with @echo off).

/CF<fname> Specifies a Command File which provides text as if it were typed


at the position where the switch appeared in the command line.
The Command File is a text file which may have multple lines.

/CK Checks remaining space before copy (default).

/CK0 Disables the pre-check of remaining space before copy.

/COPY Selects the file copy action (default).

/CLONE Duplicates a directory (volume). This switch is a shortcut for


the following combination: /KS/H/E/R/Q/Y/BI/ZY/ZE/oD0.

/CR<n> Sets the retry period (n seconds, default = 3) on failed copy.

/D Same as /DA.

/D0 Cancels all file-date related (/D...) switches.

/D:<date> Same as /DA:<date>.

/DA Copies newer files and brand new files.

/DA#<n> Copies files that were changed on or after <n> days ago.

/DA:. Copies files that were changed today or later (same as /DA#0).

/DA:<date> Copies files that were changed on or after the specified date.

/DB Copies older files and brand new files.

/DB#<n> Copies files that were changed on or before <n> days ago.

/DB:. Copies files that were changed yesterday or earlier.

/DB:<date> Copies files that were changed on or before the specified date.

/DA:<time> Same as /DA:<date> except an additional time value may be added.

/DB:<time> Same as /DB:<date> except an additional time value may be added.

The <time> parameter starts with the <date> (as shown above)
followed by 'T' or '@' and hh:mm:ss, hh:mm, or hh.

e.g., 2002-10-25T15:25:30 (recommended as ISO 8601 std)


31-10-2002@13:00 10-31-2002@13 (min and sec may be omitted)
(/D0:<date> cannot be specified with the <time> value).

/Do#<n> Copies files that were changed on the day <n> days ago.

/Do:. Copies files that were changed today only.

/Do:<date> Copies files that were changed on the specified date.

Note: A "brand new" file refers to a file which exists in the


source directory but not in the destination directory
(Micrososoft's Robocopy call it a "lonely file").

Note: With /DA#<val>, /DB#<val> and /DO#<val>, the parameter <val> will
be treated as the number of Days unless it is appended with a
one-letter suffix (D, H, M, or S which stand for Days, Hours,
Minutes, or Seconds, respectively). When <val> is given in
the number of days, the exact time is midnight of the day.

e.g., /DA#0 denotes files made some time today after midnight.
/DO#2 means all day the day before yesterday.
/DA#30m selects files made within the last 30 minutes.

/DS Copies only the files whose filetime is exactly the same.

/DX Copies only the files whose filetime is different in any way.

Note: All filetime comparisons are affected by the fuzzy range (/FF).

/DA:<val> and /DB:<val> work as a pair if both are specified.

e.g., /DA:1997-01-01 /DB:1997-12-31 files made in 1997


/DA:1997-04-01 /DB:1997-04-30 files made in April 1997
/DB:1997-03-31 /DA:1997-05-01 exclude files made in April
/DA:1997-01-01 /DB:1997-01-01 try the shorter /Do:1997-01-01

Since the US and European conventions are not reconcilable,


we recommend the ISO 8601 standard (YYYY-MM-DD) with a 4-digit
year value followed by month and day. If all values have two
digits only, it is interpreted according to the system setting.
A file date must be between 1970-01-01 and 2069-12-31.

A partial date specifier is accepted for /DA:, /DB: and /DO:


where yyyy-mm and yyyy denote the month and year respectively.
E.g., /DO:2000-2 is equivalent to /DA:2000-2-1 /DB:2000-2-29,
and /DB:1999 to /DB:1999-12-31, and /DA:2000 to /DA:2000-1-1.

Note: /DA, /DB, /DX, /DS, /Do, /DA:<date> and /DB:<date> are mutually
exclusive (except /DA:<date> and /DB:<date> work as a pair).

Note: /DA /DB and /DD, if date is omitted, are the same as /BN and /Bo
except they can be combined with another /B switch (e.g., /BI).

Note: /DA, /DB, /DX and /DS compare source and destination files using
both date and time whereas /DA:<date> and /DA#<n> use date only.
/DEBUG Shows the command parameters and prompts you to start.

/DEBUGX Shows the command parameters and exits.

/DL<n> Limits processing of directory nesting to n levels.


/DL0 removes the limit. /DL works only when /S or /E is set.

/E Copies directories and subdirectories, including empty ones.


Same as /S /E.

/EC Echoes the entire command line (after macro processing).

/ED Preserves the directory even if it becomes empty.

/ED0 Deletes empty directories (default).

/ED<n> Preserves n levels of empty directories.

Note: The /EDxx switches are in effect only with file/directory removal
operations (/Z, /RC, /RS, /RD, /RX, and /CLONE cases).

/ER Emulates XCOPY's exit code (for ERRORLEVEL check in batch files).

/EX<xlist> Specifies a text file which contains a list of xspecs (see below).

/F Displays full source and destination file names while copying.

/Fo<fname> Displays full source and file names and also saves into a file.

/FA Uses the Last-Access timestamp for Filetime comparison.

/FC Uses the Creation timestamp for Filetime comparison.

/FF Fuzzy Filetime (same as /FF2S --- matches within 2 sec).

/FF0 Fuzzy Filetime cancelled (adjustment value set to +/- 0).

/FF<val> Fuzzy Filetime, adjust ref time +/- <val> seconds.

/FF+<val> Fuzzy Filetime, adjust ref time by adding <val> seconds.

/FF-<val> Fuzzy Filetime, adjust ref time by subtracting <val> seconds.

Note: With /FF<val>, /FF+<val> and /FF-<val>, the parameter <val> will
be treated as the number of seconds unless it is appended with a
one-letter suffix (D, H, M, or S which stand for Days, Hours,
Minutes, or Seconds, respectively).
e.g., /FF treats file times within +/- 2 sec as the same.
/FF-1H treats files older by up to 1 hour as the same.
/FF+2/FF-4 (you may choose asymmetric slack values).

Note: The /FF switch affects all filetime comparisons such as /CLONE,
/BI, /BU, /BS, /BX, /BO, /BN, /DA, /DB, /DS, /DX, /TS, and /TD.

Note: The FAT (DOS/Win9x) file system has a 2-second granularity in


file time whereas NTFS, Unix and other file systems use finer
time stamps. The /FF switch is useful for incremental backup
between volumes of different file systems.

/FM0 Cancels the /FM<items> parameter previously set.

/FM<items> Specifies the output line format for /L and or /Fo output.

<items> is a string of one or more of the following letters


which selects the combination and the output order.

D file date
T file time
Z file size in bytes
A file attributes: A(rchive),H(idden),S(system),R(eadonly)
S short name (8.3)
L long name with full directory path

Note: When S and L are both missing, L is used by default.

Note: /L/FM<items> can be combined into a /L<items> switch.

/FR Legacy switch; replaced by /FF-2.

/FT Legacy switch; replaced by /FF+2.

/FL Filetime in Local time (default)

/FU Filetime in UTC (Universal Coordinated Time - same as GMT).

/FW Uses the Last-Write timestamp for Filetime comparison (default).


Note: /FW, /FA and /FC are mutually exclusive choices.
Note: /FL and /FU are mutually exclusive choices.

/G<n> Sets DATMAN N-Group (redundant) write. (<n> : 0 - 7).


e.g., /G1 writes the same data twice on DATMAN tape.

/H Copies hidden and/or system files also.

/H0 Excludes hidden and/or system files (default).

/Ho Copies hidden and/or system files only.

/HELP Shows the switches in detailed (print this output).

/HELP /X Shows Partial Help (switches starting with letter X).

/HELPA Shows the /HELP listing in alphabetical order.

/HELPE Lists the Exit codes (ERRORLEVEL values) returned by XXCOPY.

/HOSTS Displays the names of remote hosts accessed by XXCOPY.

/I If destination does not exist and copying more than one file,
assumes that destination must be a directory (no prompting).
Note: when the destination specifier ends with a backslash,
it declares as a directory which implicitly sets the /I switch.

/IA Continues if destination is absent (terminates if exists).


/IA<item> Continues if the specified item (file/directory) is absent.

/IP Continues if destination is present (terminates if absent).

/IP<item> Continues if the specified item (file/directory) is present.

/ILD<label> Continues if the destination volume label matches as specified.

/ILS<label> Continues if the source volume label matches as specified.

/IN<tmpl> Includes an alternate filename template (tmpl).


You may specify as many alternate filename patterns as you want.
The template must be for the "Lastname" of the source specifier
(no backslash in the template, but wildcard characters are OK).

/INSTALL Installs the XXCOPY software package on your computer.

/INSTALL:<dir> Installs XXCOPY in a user-specified directory.

/J Forces DATMAN catalog (journal) flush.

/J0 Suppresses DATMAN's automatic catalog (journal) flush.

/J1 Flushes DATMAN catalog when needed (default).

/J2 Flushes DATMAN catalog unconditionally at the end.

/K Keeps the source attributes including read-only (same as /KS).

/K0 Keeps H-bit and S-bit, sets A-bit, clears R-bit (default).

/KD Keeps the attributes of destination (overwritten) file.

/KN Sets the destination attributes to normal (only /A).

/KS Keeps the source attributes including the read-only bit.

/L Same as /LLZ which performs the list operation (no file copy).

/L<items> Customizes the format for List operation (no file copy).
<items> is a string of one or more of the following letters
which selects the combination and the output order.

D file date
T file time
Z file size in bytes
A file attributes: A(rchive),H(idden),S(system),R(eadonly).
S short name (8.3)
L long name with full directory path
N long name without path
R relative path
P parent path

Note: When S, L, N, and R are all missing, L is used by default.

/LICENSE Displays the XXCOPY license status on your computer.


/LTREE Lists directory tree (without copy or making directories).
Note: with /LTREE, the /DA/DB/DO parameters apply to dir time.

/M Copies only files with the archive attribute set.


Turns off the archive attribute.

/MD<dir> Makes directory before other actions (even with /L)


Tip: make a date-encoded directory with a macro reference.
e.g., /MDc:\Bkup/$DATE$ (even good for log files).

/N Uses the short (8.3) name for name matching, and creation.

/NP Uses precise name matching (ignores match in alias).

/N0 Disables /N and /NP (default, uses longname when applicable).

/NC0 Disables /NCL, /NCU, or /NCX (accepts letters of both cases).

/NCL Uses Lowercase-only name when a new file is created.

/NCU Uses Uppercase-only name when a new file is created.

/NCX Uses Uppercase-only name when a new short-name file is created.

/ND Uses the old (DOS) Wildcard treatments for filename matching.

/NW Uses the new (Win32) Wildcard treatments for filename matching.

/NI Becomes nice to other tasks by idling (1000 msec) between actions.

/NI<n> Same as /NI. Specifies n msec as the idle time (0 to disable it).

/NL Renames longname to match the source (No copy operations).

/NS Renames shortname to match the source (No copy operations).

/NX Preserves the shortname when the file is copied.

/NX0 Disables the /NX (shortname preservation) feature.

Note: If src and dst are both local drive, the shortname will be
preserved (/NX) by default, but if either src or dst is
specified by a UNC (starts with \\), /NX0 is default.

/o0 Cancels the /oN or /oA switch specified earlier.

/oA<fname> Appends to a logfile, reporting errors. (does not overwrite log).

/oN<fname> Outputs a new logfile, reporting errors (make a new log) file.

/oQ Surrounds pathname output with quotation marks

/oD<n> Deleted file list (by a /Z or /ZY switch).

/oE<n> Error summary with the system error code

/oF<n> File list (files which were successfully operated on).


/oI<n> Include-item (alternate file template) list.

/oP<n> Parameter (command switch detailed) list.

/oS<n> Skipped-file list (with the reason why skipped).

/oX<n> Exclude-item list.

The sufix value <n> for /oD /oE /oF /oI /oP /oS /oX works as follows:
0: No output
1: Screen only
2: Log file only
3: Screen and Log file both

Note: It is advised that the log file created by /oA or /oN to be


free from the names of successfully copied files that would
overshadow relatively infrequent lines of error and warning.
Instead, use the /Fo switch to create a separate file for a
list of successfully copied files.

/P Prompts you before creating each destination file.

/PB Shows Progress bar for the job (default file progress >= 1M).

/PB<n> Shows Progress bar for the job and another Progress bar for a
single-file progress with file length greater than <n>, which is
specified in bytes (or with a suffix, K, M or G) (default: 1M).

/PBH Enables Progress bar Halt/Abort button (default).

/PBH0 Disables Progress bar Halt/Abort button.

/PC Prompts you before creating new files.

/PC0 Suppresses warning on file-creation.

/PD Prompts you before starting each directory with options for...
Y (Yes), N (No), A (All), R (Remaining dirs), S (This & subdirs).

/PD0 Suppresses the prompt before a destructive processing of directory.

/PN Prompts when on excessive failures on /NX operations.

/PN0 Suppresses prompts on excessive failures of /NX operatoins.

/Po Prompts you before overwriting existing files (default).

/Po0 Suppresses warning on file-overwrite (Legacy /Y).

/PZ Prompts you for confirmation of the dst (for /CLONE /Z /ZY).

/PZ0 Suppresses prompts for directory confirmation on /CLONE /Z /ZY.

/Q Same as /Q1. Does not display files which are skipped.


/Q0 Displays all filenames.

/Q1 Does not display files which are skipped.

/Q2 Does not display directories which are excluded.

/Q3 Does not display file and directory names while copying.

/QF Quits when the quota for the file count has been reached.

/QBL Quits before the byte count exceeds the limit (same as /QB).

/QBT Quits when the total byte count reaches the trigger point.

/QSL Quits before the space dips below the limit (same as /QS).

/QST Quits when the remaining space reaches the trigger point.

/R Allows overwrite/delete of read-only files.

/R0 Cancels overwrite/delete of read-only files.

/RC Removes files in src after a successful copy (equivalent to move).

/RCP Prompts on source-file-remove after successful copy (default).

/RCY Suppresses prompts after a successful source-file-remove.

/RD Removes files in dst which qualify to be overwritten (no copying).

/RMDIR Removes a directory. Same as /RS/S/H/R/PD0/ED0.

/RS Removes files in src which qualify (no copying).

/RX Removes files in dst which are absent in src (no copying).

Note: Whereas /Y and /-Y modify prompting for the copy action
of /RC (Remove after Copy) switch, the suffix 'P' or 'Y' controls
the prompt for the file remove action after copy.

Note: The suffix 'P' or 'Y' can also be added to any of /RS, /RD,
or /RX switches which will insert or suppress respective prompt.
For these remove-without-copy switches, the /Y and /-Y switches
also control the prompt for the remove action.

Note: /RX can be thought of a /Z operation without copying files.";


In general, the /RS/BB combination (by swapping src and dst)";
provides more file-selection controls than the /RX switch.";

Note: /PD and /PD0 control additional prompt on each directory.

/S Copies directories and subdirectories except empty ones.

/SC Same as /SC3 (copies security info).

/SC0 Cancels the /SC or /SF switch (no security info copied).

/SC1 Copies security info (Permissions only) when a file is copied.


/SC2 Copies security info (Auditing only) when a file is copied.

/SC3 Copies security info (both Perm, Audit) when a file is copied.

/SF Same as /SF3 (fixes up security info)

/SF0 Cancels the /SC or /SF switch (equivalent to /SC0).

/SF1 Fixes up security info (Permissions only) (no file copy).

/SF2 Fixes up security info (Auditing only) (no file copy).

/SF3 Fixes up security info (both Perm, Audit) (no file copy).

Note: /SC and /SF work only when src and dst are both NTFS.

/SG Same as /SGN (see variations in handling duplicates below).

/SGF Gathers files into one-level directory (unsorted First file 1st).

/SGN Gathers files into one-level directory (sorted, Newest file 1st).

/SGo Gathers files into one-level directory (sorted, Oldest file 1st).

/SGFo Gathers files into one-level directory (First only).

/SGNo Gathers files into one-level directory (Newest only).

/SGoo Gathers files into one-level directory (Oldest only).

/SG0 Cancels file-gather switches (/SG...).

/SL Flattens subdirectories, add-name-Left (see below).

/SR Flattens subdirectories, add-name-Right (see below).

/SX Flattens subdirectories, add-name-Middle (see below).

/SLR Rebuilds flattened directory (path to the left).

/SRR Rebuilds flattened directory (path to the right).

/SXR Rebuilds flattened directory (path in the middle).

/S<d> Sets the directory delimiter character for /SL, /SX and /SR,
where <d> is any legal non-alphabetic, non-blank character.
The default delimiter is back-apostrophe (`).
/SL, /SX, and /SR are the same as /S except the output files
will be saved as a flat directory without adding levels of
subdirectories. The source subdirectory name will become a
part of the target filename. /SL and /SR add the subdir name
to the left or right of the name respectively.
/SX inserts the subdirectory name in the middle.

/SP Spans the copy job over multiple destination (new volume).

/SZ:<n>-<m> Copies a file whose size is between n bytes and m bytes


/SZ:<n>- Copies a file whose size is equal to or greater than n bytes

/SZ:-<m> Copies a file whose size is equal to or less than m bytes

/SZ:<n> Copies a file whose size is exactly n bytes

/SZ!<n>-<m> Copies a file whose size is NOT between n bytes and m bytes

/SZ!<n>- Copies a file whose size is NOT equal to or greater than n bytes

/SZ!-<m> Copies a file whose size is NOT equal to or less than m bytes

/SZ!<n> Copies a file whose size is NOT equal to n bytes

/SZ:- Disables size-based selection (/SZ!- also works).

Note: The size values <n> and <m> are entered in bytes unless appended
with a suffix letter (K, M, or G which stand for metric kilo
(x1000), mega (x1000000), or giga (x1000000000), respectively).

/SZ<n> Legacy switch; replaced by /TR<n>.

/T Creates directory structure, but does not copy files. It copies


all directories including empty ones (implicitly sets /E).

/TTA Touches (modifies) timestamp of Last Access of src.

/TTA0 Preserves timestamp of Last Access of src (default).

/TCA Copies the timestamp of Last Access fm src to dst.

/TCA0 Uses current time for dst Last Access (default).

/TCC Copies the timestamp of Create Time fm src to dst.

/TCC0 Uses current time for dst Create time (default).

/TCW Copies the Last Write time fm src to dst (default).

/TCW0 Uses current time for dst Last Write time.

/TD+<n> Adds an offset to the time of the destination file.

/TD-<n> Subtracts an offset time from the dst file for comparison.

/TS+<n> Adds an offset to the time of source (and the copied ) file.

/TS-<n> Subtracts an offset time from source (and the copied) file.

The offset value <n> is treated as the number of Hours


unless it is appended with a one-letter suffix (D, H, M, or S
which stand for Days, Hours, Minutes, or Seconds respectively).

/TM0 Cancels the time offset in days set by /TM+ or /TM-.

/TM+<n> Adds an offset (Dy) to the current time of macro reference.


/TM-<n> Subtracts an offset (Dy) to the current time of macro reference.

Note: The offset value <n> for /TM+ and /TM- is specified in days
unless it is appended with a one-letter suffix (D, H, M, or S
which stand for Days, Hours, Minutes, or Seconds respectively).

/TR<n> Truncates the new file to (copies the first) n bytes.

Note: The /TR<n> switch replaces the legacy /SZ<n> switch.

/U Updates the files that already exist in destination.

/UNINSTALL Uninstalls XXCOPY from your computer.

/V Verifies after copy; default (same as /V1).

/V0 Disables verify switch (canceling /V, /V1, or /V2).

/V1 Verifies after copy (quick test --- file size match).

/V2 Verifies after copy byte-by-byte check (DATMAN 2-pass).

/VE Displays only error cases of DATMAN 2-pass verify (/V2)

/W Same as /WS.

/WD Prompts with a warning for copying a non-directory src (default).

/WD0 Suppresses warning for copying a non-directory source.

/WE Prompts you to press a key at the end of copying.

/WE<n> Waits at the end of the operation for a specified period (n sec).

/WS Prompts you to press a key at the start of copying.

/WS<n> Waits at the start of operation for a specified period (n sec).

/WV This switch is now obsolete and has no effect.

/WV0 This switch is now obsolete and has no effect.

/X<xspec> Adds an exclusion specifier (xspec) (see below for exclusion).

<xspec> Exclusion item for /X and the file contents specified by /EX.

. The text file may contain an arbitrary number of xspecs which


are separated by space, tab, or newline characters.

. An xspec with embedded spaces must be surrounded by a pair


of double-quote characters(").

. An xspec cannot span from one line to another.

. Two consecutive colons (::) or slashes (//) start a comment


field which ends at the end of the line.

. You may specify more than 1 exclusion file. In such a


case all of the exclusion files will be processed.

Exclusion specifier (xspec) syntax (consists of up to 3 parts):

syntax to exclude files:

[ dir_spec\ ] [ *\ ] [ ftemplate ]

syntax to exclue directires:

[ dir_spec\ ] [ *\ ] [ dtemplate ]

dir_spec is always followed by a backslash (\). It specifies


a directory (or directories with wildcard) which
are relative to the source directory unless it
starts with a \. A wildcard specifier is allowed
only in the last element of dir_spec.

*\ This part, if present, specifies that the exclusion


applies to all subdirectories under dir_spec.

ftemplate File_template, must not contain backslash (\).


It may contain wildcard characters (* and/or ?).

dtemplate Directory_template, the template must be terminated


by one of the following four endings (three types)

dirname\*\* full directory


dirname\ full directory (same as dirname\*\*)
dirname\* partial directory, files only
dirname\?\* partial directory, subdirs only

The dirname part may have wildcards (* and/or ?).

Any of the three parts can be omitted.


There are 11 classes in xspecs as follows.

D dir_spec\ftmpl H dir_spec\*\ftmpl
A dir_spec\* E dir_spec\dtmpl\* I dir_spec\*\dtmpl\*
B dir_spec\?\* F dir_spec\dtmpl\?\* J dir_spec\*\dtmpl\?\*
C dir_spec\*\* G dir_spec\dtmpl\*\* K dir_spec\*\dtmpl\*\*

If dir_spec is omitted, the file_template applies to all subdirs.


XXCOPY optimizes the exclusion parameter by eliminating
some redundant specifiers.
Use "/W/oX" with xspec to test the syntax.

/Y Overwrites existing files without prompt (same as /Po0) (see /BB).

/-Y Prompts you before overwriting existing files (same as /Po).

/Y0 Same as above (also /Po or /-Y).

/YY Suppresses ALL prompts unconditionally (good in a batch script).

/Z Deletes extra files or subdirectories in destination.


/ZY Same as /Z except there is no confirmation prompt.

/ZE Disables the use of all Environment Variables for XXCOPY.

/ZS Disables the sign-on message and statistics output.

/ZX Disables the use of the Environment Variable XXCOPYX.

/ZX0 Enables the XXCOPYX settings. Good for /CLONE and /RMDIR.
The shortcut /CLONE and /RMDIR contain /ZE as a component.
e.g., /CLONE/ZX0 allows the use of XXCOPYX settings.

/$xxxx$ Predefined macros for current date and time which may appear
anywhere in the command argument and other XXCOPY parameters.
Examples below are for the current time, Dec 25, 2002 13:15:30.

/$DATE$ Expands to month and date (equivalent to /$MMDD$) --> "1225".

/$TIME$ Expands to hour and minutes (equiv. /$HHNN$) --> "1315".

/$YYMMDD$ Expands to 2-digit year month day --> "021225".

/$YYYY-MM$ Expands to 4-digit year month --> "2002-12".

/$HHNNSS$ Expands to hour minutes second --> "131530".

/$MON-DD$ Expands to month day --> "DEC-25".

/$WWW$ Expands to day of the week --> "WED".

/$W$ Expands to ordinal number of day of the week --> "3".

/$II-IWK-K$ Expands to the ISO 8601 year-week --> "02-W52-3".

/$HOST$ Expands to the name of the host (current) computer

Punctuation with ( . , - _ ' ! # % & @ ~ { } ` T ) may be used.

/%xxxx% Environment variable (E-Var) reference in command files


(/CF and /EX). Like the macro reference counterpart,
the string value which correspoinds to an E-Var can be
brought in the command line text using the /%xxxx% syntax.
Note that this syntax should be used only inside the
external file text for XXCOPY (/CF and /EX) which cannot
be processed by the OS's command processor. That is, in
the regular command line, the E-Var reference is already
supported (without a leading slash as the prefix).

===============================================================================

Summary XXCOPY switches that check two directories: -------


/ src \
Files are classified into four groups; | ---+---
--------------------------------------------- | A / B | \
A files in src which do not exist in dst | | | |
B files in src which also exist in dst \ | C / D |
C files in dst which also exist in src ---+--- |
D files in dst which do not exist in src \ dst /
-------
/BB all files in A (none in B)
/BI all files in A plus files in B that are different in filetime or size
/BX all files in A plus files in B that are different in filetime
/BZX all files in A plus files in B that are different in size
/BZL all files in A plus files in B that are larger
/BZS all files in A plus files in B that are smaller
/BZE all files in A plus files in B that are the same size
/BN all files in A plus files in B that have newer filetime
/Bo all files in A plus files in B that have older filetime
/BE all files in A plus files in B that have exactly the same time and size
/BS (none in A) files in B that have exactly the same time and size
/U (none in A) all files in B (subject to other switches)
/U/BI (none in A) files in B that are different in filetime or size

Note: all the variations in the backup switches (/Bx) include the files in A
with the exception of /BS to be consistent with the spirit of BACKUP.
As shown in the example (/U/BI), adding /U eliminates the files in A.

/RS files in A and/or B that satisfy other specified switches (for remove).
/RC same as /RS (for remove-after-copy).
/RD (none in D) files in C that would be overwritten (for remove).
/RX all files in D (for remove).

Note: /BS for copy usually accomplishes nothing but is useful as /RS/BS.

Das könnte Ihnen auch gefallen