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. /? ... /? /0 /1 /A /A0 /AA /AC /AN<mask> /AR<mask> /ARD<mask> /AS<mask> /ASD<mask> Note: Shows a summary of the switches on one page. Shows related switches when entered with other switches. Disables DATMAN One-pass copy (not recommended, but allowed). DATMAN One-pass copy (when copying from DATMAN tape, default). Same as /ATA. Copies files with the archive attribute set. Doesn't change the attribute. Ignores the archive attribute bit and does not change it. Sets the src file archive bit (without actually copying). Copies specified files irrespective of the archive attribute. Turns off the archive attribute after XXCOPY is done. Sets a new value to file attribute bits (replace the value). The <mask> value is a combination of letters, AHSRC. Resets file attribute bits (clears specified bits). Resets directory attribute bits (clears specified bits). Sets file attribute bits (sets specified bits). Sets directory attribute bits (sets specified bits). 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. 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

/AX<mask>

exclude files with only the specified combination of attribute bits. E.g., /AXAH excludes files with both A-bit and H-bit. Note: /AZ Note: The /AT<mask> and /AX<mask> switches have opposite conjugation rules (the effects of combining attribute bits --- AND and OR). Clears the src file archive bit (without actually copying). 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.). Undo any of /BI, /BB, /BN, /Bo, /BX, or /BZ switches. Backs up brand new files only (does not overwrite existing ones). Backs up exactly the same files(includes brand new files). Backs up incrementally, different (by time/size) files only. Backs up newer files only Backs up older files only (includes brand new files). (includes brand new files).

/B0 /BB /BE /BI /BN /Bo /BS /BU /BX /BZ /BZE /BZS /BZL /BZX /BACKUP /C /C0 /CA /CA0 /CA1 /CA2 /CA3 /CA4 /CA5 /CA6 /CA7

Selects exactly the same files (this is useful with /RS). Standard Backup switch (same as /r/i/bi/q/c/h/e/v/y). Backs up different-date files Same as /BZX. Backs up equal-size files (includes brand new files). (includes brand new files).

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

Backs up different-size files

Standard Backup without deleting any file (/CLONE without /ZY). A shortcut for the following combination: /KS/H/E/R/Q/Y/BI/ZE/oD0. Continues copying even if errors occur (default). Disables the /C switch (terminates upon error). Enables all cache. Same Cache control: src-rd = Cache control: src-rd = Cache control: src-rd = Cache control: src-rd = Cache control: src-rd = Cache control: src-rd = Cache control: src-rd = Cache control: src-rd = as /CA7 (default). OFF dst-wr = OFF OFF dst-wr = OFF OFF dst-wr = ON OFF dst-wr = ON ON dst-wr = OFF ON dst-wr = OFF ON dst-wr = ON ON dst-wr = ON dst-rd dst-rd dst-rd dst-rd dst-rd dst-rd dst-rd dst-rd = = = = = = = = OFF ON OFF ON OFF ON OFF ON

/CL /CB /CBQ /CB0 /CC /CC0 /CCY /CE /CF<fname>

Legacy switch, replaced by /CA Continues batch file if XXCOPY ended OK last time. Same as /CB except suppresses console output to end immediately. Cancels the /CB and /CBQ switches. Warns a cyclic copy with a Y/N prompt. Disallows cyclic copy (src includes the dst directory) (default). Allows a cyclic copy by excluding the destination from the src. Same as /CBQ/EC (most useful in batch file with @echo off). 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. Checks remaining space before copy (default). Disables the pre-check of remaining space before copy. Selects the file copy action (default). Duplicates a directory (volume). This switch is a shortcut for the following combination: /KS/H/E/R/Q/Y/BI/ZY/ZE/oD0. Sets the retry period (n seconds, default = 3) on failed copy. Same as /DA. Cancels all file-date related (/D...) switches. Same as /DA:<date>. Copies newer files and brand new files. Copies files that were changed on or after <n> days ago.

/CK /CK0 /COPY /CLONE /CR<n> /D /D0 /D:<date> /DA /DA#<n> /DA:. /DA:<date> /DB /DB#<n> /DB:. /DB:<date> /DA:<time> /DB:<time>

Copies files that were changed today or later (same as /DA#0). Copies files that were changed on or after the specified date. Copies older files and brand new files. Copies files that were changed on or before <n> days ago. Copies files that were changed yesterday or earlier. Copies files that were changed on or before the specified date. Same as /DA:<date> except an additional time value may be added. 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> /Do:. /Do:<date> Note: Copies files that were changed on the day Copies files that were changed today only. Copies files that were changed on the specified date. 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"). 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 /DX Note: Copies only the files whose filetime is exactly the same. Copies only the files whose filetime is different in any way. 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 /DA:1997-04-01 /DB:1997-03-31 /DA:1997-01-01 /DB:1997-12-31 /DB:1997-04-30 /DA:1997-05-01 /DB:1997-01-01 files made in 1997 files made in April 1997 exclude files made in April try the shorter /Do:1997-01-01 <n> days ago.

Note:

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: Note: Note: /DA, /DB, /DX, /DS, /Do, /DA:<date> and /DB:<date> are mutually exclusive (except /DA:<date> and /DB:<date> work as a pair). /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). /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 /DEBUGX /DL<n> /E /EC /ED /ED0 /ED<n> Note: /ER /EX<xlist> /F /Fo<fname> /FA /FC /FF /FF0 /FF<val> /FF+<val> /FF-<val> Note:

Shows the command parameters and prompts you to start. Shows the command parameters and exits. Limits processing of directory nesting to n levels. /DL0 removes the limit. /DL works only when /S or /E is set. Copies directories and subdirectories, including empty ones. Same as /S /E. Echoes the entire command line (after macro processing). Preserves the directory even if it becomes empty. Deletes empty directories (default). Preserves n levels of empty directories. The /EDxx switches are in effect only with file/directory removal operations (/Z, /RC, /RS, /RD, /RX, and /CLONE cases). Emulates XCOPY's exit code (for ERRORLEVEL check in batch files). Specifies a text file which contains a list of xspecs (see below). Displays full source and destination file names while copying. Displays full source and file names and also saves into a file. Uses the Last-Access timestamp for Filetime comparison. Uses the Creation timestamp for Filetime comparison. Fuzzy Filetime (same as /FF2S --- matches within 2 sec). Fuzzy Filetime cancelled (adjustment value set to +/- 0). Fuzzy Filetime, adjust ref time +/- <val> seconds. Fuzzy Filetime, adjust ref time by adding <val> seconds. Fuzzy Filetime, adjust ref time by subtracting <val> seconds. 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). The /FF switch affects all filetime comparisons such as /CLONE, /BI, /BU, /BS, /BX, /BO, /BN, /DA, /DB, /DS, /DX, /TS, and /TD. 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

Note: Note:

between volumes of different file systems. /FM0 /FM<items> Cancels the /FM<items> parameter previously set. 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 T Z A S L file date file time file size in bytes file attributes: A(rchive),H(idden),S(system),R(eadonly) short name (8.3) 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 /FT /FL /FU /FW Legacy switch; replaced by /FF-2. Legacy switch; replaced by /FF+2. Filetime in Local time (default) Filetime in UTC (Universal Coordinated Time - same as GMT). 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. Sets DATMAN N-Group (redundant) write. (<n> : 0 - 7). e.g., /G1 writes the same data twice on DATMAN tape. Copies hidden and/or system files also. Excludes hidden and/or system files (default). Copies hidden and/or system files only. Shows the switches in detailed (print this output). Shows Partial Help (switches starting with letter X). Shows the /HELP listing in alphabetical order. Lists the Exit codes (ERRORLEVEL values) returned by XXCOPY. Displays the names of remote hosts accessed by XXCOPY. 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. Continues if destination is absent (terminates if exists).

/G<n> /H /H0 /Ho /HELP /HELP /X /HELPA /HELPE /HOSTS /I

/IA

/IA<item> /IP /IP<item> /ILD<label> /ILS<label> /IN<tmpl>

Continues if the specified item (file/directory) is absent. Continues if destination is present (terminates if absent). Continues if the specified item (file/directory) is present. Continues if the destination volume label matches as specified. Continues if the source volume label matches as specified. 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). Installs the XXCOPY software package on your computer. Installs XXCOPY in a user-specified directory.

/INSTALL

/INSTALL:<dir> /J /J0 /J1 /J2 /K /K0 /KD /KN /KS /L /L<items>

Forces DATMAN catalog (journal) flush. Suppresses DATMAN's automatic catalog (journal) flush. Flushes DATMAN catalog when needed (default). Flushes DATMAN catalog unconditionally at the end. Keeps the source attributes including read-only (same as /KS). Keeps H-bit and S-bit, sets A-bit, clears R-bit (default). Keeps the attributes of destination (overwritten) file. Sets the destination attributes to normal (only /A). Keeps the source attributes including the read-only bit. Same as /LLZ which performs the list operation (no file copy). 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 T Z A S L N R P file date file time file size in bytes file attributes: A(rchive),H(idden),S(system),R(eadonly). short name (8.3) long name with full directory path long name without path relative path 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 /M /MD<dir>

Lists directory tree (without copy or making directories). Note: with /LTREE, the /DA/DB/DO parameters apply to dir time. Copies only files with the archive attribute set. Turns off the archive attribute. 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). Uses the short (8.3) name for name matching, and creation. Uses precise name matching (ignores match in alias). Disables /N and /NP (default, uses longname when applicable). Disables /NCL, /NCU, or /NCX (accepts letters of both cases). Uses Lowercase-only name when a new file is created. Uses Uppercase-only name when a new file is created. Uses Uppercase-only name when a new short-name file is created. Uses the old (DOS) Wildcard treatments for filename matching. Uses the new (Win32) Wildcard treatments for filename matching. Becomes nice to other tasks by idling (1000 msec) between actions. Same as /NI. Specifies n msec as the idle time (0 to disable it).

/N /NP /N0 /NC0 /NCL /NCU /NCX /ND /NW /NI /NI<n> /NL /NS /NX /NX0

Renames longname to match the source (No copy operations). Renames shortname to match the source (No copy operations). Preserves the shortname when the file is copied. 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 /oA<fname> /oN<fname> /oQ /oD<n> /oE<n> /oF<n>

Cancels the /oN or /oA switch specified earlier. Appends to a logfile, reporting errors. (does not overwrite log). Outputs a new logfile, reporting errors (make a new log) file. Surrounds pathname output with quotation marks Deleted file list (by a /Z or /ZY switch). Error summary with the system error code File list (files which were successfully operated on).

/oI<n> /oP<n> /oS<n> /oX<n>

Include-item (alternate file template) list. Parameter (command switch detailed) list. Skipped-file list (with the reason why skipped). 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 /PB /PB<n>

Prompts you before creating each destination file. Shows Progress bar for the job (default file progress >= 1M). 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). Enables Progress bar Halt/Abort button (default).

/PBH /PBH0 /PC /PC0 /PD /PD0 /PN /PN0 /Po /Po0 /PZ /PZ0 /Q

Disables Progress bar Halt/Abort button. Prompts you before creating new files. Suppresses warning on file-creation. Prompts you before starting each directory with options for... Y (Yes), N (No), A (All), R (Remaining dirs), S (This & subdirs). Suppresses the prompt before a destructive processing of directory. Prompts when on excessive failures on /NX operations. Suppresses prompts on excessive failures of /NX operatoins. Prompts you before overwriting existing files (default). Suppresses warning on file-overwrite (Legacy /Y). Prompts you for confirmation of the dst (for /CLONE /Z /ZY). Suppresses prompts for directory confirmation on /CLONE /Z /ZY. Same as /Q1. Does not display files which are skipped.

/Q0 /Q1 /Q2 /Q3 /QF /QBL /QBT /QSL /QST /R /R0 /RC /RCP /RCY /RD /RMDIR /RS /RX Note:

Displays all filenames. Does not display files which are skipped. Does not display directories which are excluded. Does not display file and directory names while copying. Quits when the quota for the file count has been reached. Quits before the byte count exceeds the limit (same as /QB). Quits when the total byte count reaches the trigger point. Quits before the space dips below the limit (same as /QS). Quits when the remaining space reaches the trigger point. Allows overwrite/delete of read-only files. Cancels overwrite/delete of read-only files. Removes files in src after a successful copy (equivalent to move). Prompts on source-file-remove after successful copy (default). Suppresses prompts after a successful source-file-remove. Removes files in dst which qualify to be overwritten (no copying). Removes a directory. Same as /RS/S/H/R/PD0/ED0.

Removes files in src which qualify (no copying). Removes files in dst which are absent in src (no copying). 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. 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. /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."; /PD and /PD0 control additional prompt on each directory. Copies directories and subdirectories except empty ones. Same as /SC3 (copies security info). Cancels the /SC or /SF switch (no security info copied). Copies security info (Permissions only) when a file is copied.

Note:

Note:

Note: /S /SC /SC0 /SC1

/SC2 /SC3 /SF /SF0 /SF1 /SF2 /SF3 Note: /SG /SGF /SGN /SGo /SGFo /SGNo /SGoo /SG0 /SL /SR /SX /SLR /SRR /SXR /S<d>

Copies security info (Auditing only)

when a file is copied.

Copies security info (both Perm, Audit) when a file is copied. Same as /SF3 (fixes up security info) Cancels the /SC or /SF switch (equivalent to /SC0). Fixes up security info (Permissions only) (no file copy). Fixes up security info (Auditing only) (no file copy).

Fixes up security info (both Perm, Audit) (no file copy). /SC and /SF work only when src and dst are both NTFS. Same as /SGN (see variations in handling duplicates below). Gathers files into one-level directory (unsorted First file 1st). Gathers files into one-level directory (sorted, Newest file 1st). Gathers files into one-level directory (sorted, Oldest file 1st). Gathers files into one-level directory (First only).

Gathers files into one-level directory (Newest only). Gathers files into one-level directory (Oldest only). Cancels file-gather switches (/SG...). Flattens subdirectories, add-name-Left Flattens subdirectories, add-name-Right (see below). (see below).

Flattens subdirectories, add-name-Middle (see below). Rebuilds flattened directory (path to the left). Rebuilds flattened directory (path to the right). Rebuilds flattened directory (path in the middle). 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. Spans the copy job over multiple destination (new volume).

/SP

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

/SZ:<n>/SZ:-<m> /SZ:<n> /SZ!<n>-<m> /SZ!<n>/SZ!-<m> /SZ!<n> /SZ:Note:

Copies a file whose size is equal to or greater than n bytes Copies a file whose size is equal to or less than m bytes Copies a file whose size is exactly n bytes Copies a file whose size is NOT between n bytes and m bytes Copies a file whose size is NOT equal to or greater than n bytes Copies a file whose size is NOT equal to or less than m bytes Copies a file whose size is NOT equal to n bytes Disables size-based selection (/SZ!- also works). 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). Legacy switch; replaced by /TR<n>. Creates directory structure, but does not copy files. It copies all directories including empty ones (implicitly sets /E). Touches (modifies) timestamp of Last Access of src. Preserves timestamp of Last Access of src (default). Copies the timestamp of Last Access fm src to dst. Uses current time for dst Last Access (default). Copies the timestamp of Create Time fm src to dst. Uses current time for dst Create time (default). Copies the Last Write time fm src to dst (default). Uses current time for dst Last Write time.

/SZ<n> /T /TTA /TTA0 /TCA /TCA0 /TCC /TCC0 /TCW /TCW0

/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 /TM+<n> Cancels the time offset in days set by /TM+ or /TM-. Adds an offset (Dy) to the current time of macro reference.

/TM-<n> Note:

Subtracts an offset (Dy) to the current time of macro reference. 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). Truncates the new file to (copies the first) n bytes. The /TR<n> switch replaces the legacy /SZ<n> switch. Updates the files that already exist in destination. Uninstalls XXCOPY from your computer. Verifies after copy; default (same as /V1). Disables verify switch (canceling /V, /V1, or /V2). Verifies after copy (quick test --- file size match). Verifies after copy byte-by-byte check (DATMAN 2-pass). Displays only error cases of DATMAN 2-pass verify (/V2) Same as /WS. Prompts with a warning for copying a non-directory src (default). Suppresses warning for copying a non-directory source. Prompts you to press a key at the end of copying. Waits at the end of the operation for a specified period (n sec). Prompts you to press a key at the start of copying. Waits at the start of operation for a specified period (n sec). This switch is now obsolete and has no effect. This switch is now obsolete and has no effect.

/TR<n> Note: /U /UNINSTALL /V /V0 /V1 /V2 /VE /W /WD /WD0 /WE /WE<n> /WS /WS<n> /WV /WV0

/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. File_template, must not contain backslash (\). It may contain wildcard characters (* and/or ?). Directory_template, the template must be terminated by one of the following four endings (three types) dirname\*\* dirname\ dirname\* dirname\?\* full directory full directory (same as dirname\*\*) partial directory, files only partial directory, subdirs only

*\ ftemplate dtemplate

The dirname part may have wildcards (* and/or ?). Any of the three parts can be omitted. There are 11 classes in xspecs as follows. A dir_spec\* B dir_spec\?\* C dir_spec\*\* D E F G dir_spec\ftmpl dir_spec\dtmpl\* dir_spec\dtmpl\?\* dir_spec\dtmpl\*\* H I J K dir_spec\*\ftmpl dir_spec\*\dtmpl\* dir_spec\*\dtmpl\?\* 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 /-Y /Y0 /YY /Z Overwrites existing files without prompt (same as /Po0) (see /BB). Prompts you before overwriting existing files (same as /Po). Same as above (also /Po or /-Y). Suppresses ALL prompts unconditionally (good in a batch script). Deletes extra files or subdirectories in destination.

/ZY /ZE /ZS /ZX /ZX0

Same as /Z except there is no confirmation prompt. Disables the use of all Environment Variables for XXCOPY. Disables the sign-on message and statistics output. Disables the use of the Environment Variable XXCOPYX. 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. 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. Expands to month and date (equivalent to /$MMDD$) --> "1225". Expands to hour and minutes (equiv. /$HHNN$) --> "1315". Expands to 2-digit year month day --> "021225". Expands to 4-digit year month --> "2002-12". Expands to hour minutes second --> "131530". Expands to month day --> "DEC-25". Expands to day of the week --> "WED". Expands to ordinal number of day of the week --> "3". Expands to the ISO 8601 year-week --> "02-W52-3". Expands to the name of the host (current) computer Punctuation with ( . , - _ ' ! # % & @ ~ { } ` T ) may be used.

/$xxxx$

/$DATE$ /$TIME$ /$YYMMDD$ /$YYYY-MM$ /$HHNNSS$ /$MON-DD$ /$WWW$ /$W$ /$II-IWK-K$ /$HOST$

/%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 \ | ---+--| A / B | \ | | | |

Files are classified into four groups; --------------------------------------------A files in src which do not exist in dst

B C D /BB /BI /BX /BZX /BZL /BZS /BZE /BN /Bo /BE /BS /U /U/BI Note: all all all all all all all all all all

files in src which also exist in dst files in dst which also exist in src files in dst which do not exist in src files files files files files files files files files files (none (none (none in in in in in in in in in in in in in A A plus A plus A plus A plus A plus A plus A plus A plus A plus A) A) all A) (none files files files files files files files files files files files files in in in in in in in in in in in in in

\

B) B that are different in filetime or size B that are different in filetime B that are different in size B that are larger B that are smaller B that are the same size B that have newer filetime B that have older filetime B that have exactly the same time and size B that have exactly the same time and size B (subject to other switches) B that are different in filetime or size

| C / D | ---+--| \ dst / -------

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. files in A and/or B that satisfy other specified switches (for remove). same as /RS (for remove-after-copy). (none in D) files in C that would be overwritten (for remove). all files in D (for remove). /BS for copy usually accomplishes nothing but is useful as /RS/BS.

/RS /RC /RD /RX Note: