[ Back to Table of Contents ]
[ << ]
[ >> ]
XXCOPY TECHNICAL BULLETIN #27
From: Kan Yabumoto tech@xxcopy.com
To: XXCOPY user
Subject: XXCOPY Command Reference Functional Classification
Date: 2010-01-01 Revised for ver 3.00.0
===============================================================================
Introduction:
This is the third technical bulletin featuring XXCOPY's switches.
With nearly 200 distinct command switches (and growing), a mere
alphabetical listing hardly helps new users who are looking for
a particular functionality in XXCOPY. The more power that is
added with each new switch seems to be offset by the extra burden
in locating the needed feature, thus possibly making the program
harder to use. It is this irony that prompted me to try it again.
The emphasis in this article is not the details, but the
relationships of one another. The bigger picture in this article
hopefully helps you retain what you read in here. Therefore, the
description of each switch is limited to a terse single-line
format. For a more complete description, you should look up the
alphabetic listing XXTB #26.
Taxonomy of XXCOPY command line components
The XXCOPY command switches can be grouped into several large
groups. They are further divided into sub-categories by the
nature of the action they perform. The following table should
serve you as a quick reference card.
Group Examples
------------------------------------------------------------------------
1. Action selectors
1.1 Copy (default) /CoPY
1.2 Move (copy-and-delete) /MVD /MVF /MVX /RC
1.3 Remove /RS /RD /RX /RMDIR
1.4 Modify-Attributes /AA /AZ /AC /ANxx /ARxx /ASxx /ARDxx /ASDxx
1.5 SFN/LFN adjustment /NL /NS
1.6 Installation and license /INSTALL /UNINSTALL /LICENSE /HOSTS /ADDHOST
1.7 List/Find /L /LTREE /ZLX see 3.1
1.8 Hard Link and unlink /MLH /ULH
1.9 Miscellaneous commands /NoP /WHICHX
2. File Selectors
2.1 Source Specifier (not a switch)
2.1.1 Volume
2.1.2 Base Directory
2.1.3 Directory template with wildcards
2.1.4 Filename template with wildcards
2.2 By the characteristics of the source file
2.2.1 by Alternate Filename /IN (name pattern)
2.2.2 by Exclusion /X (dir/name patterns) /EX /GX
2.2.3 by File Date /DA: /DA# /DB: /DB# /Do:
2.2.4 by File Size /SZ: /SZ!
2.2.5 by File Attributes /H /Ho /A /M /AT /AX
2.2.6 by J-thingy Type /JX /JI
2.3 By comparison with the file in destination
2.3.1 by Presence/Absence /BB /U
2.3.2 by File Date /BN /Bo /BX /DA /DB /Do /DS /DX
2.3.3 by File Size /BZE /BZS /BZL /BZX
2.3.4 by Combination /BI /BA /BE /BS /BU /CLONE
2.3.5 by File Data /CDM /CDU /CDX
3. Action Modifiers
3.01 Console Output /EC /ZS /Q /F /L
3.02 Screen and Log output control /oBx/oCx/oDx/oEx/oFx/oHx//oIx/oPx/oSx/oXx
3.03 Screen and Log output format /oQ /oR /WI
3.04 Log File and List File /oA /oN /Fo /FM
3.05 Subdirectories /S /E /T /ED /DL
3.06 File Gathering /SG /SGF/SGN/SGo/SGL/SGFo/SGNo/SGoo/SGLo
3.07 Directory Flattening /SL /SR /SX /SLR /SRR /SXR /S<d>
3.08 J-thingy Handling /JJ /JR /JH /JL /JP /JM /JS
3.09 File Name Treatments /NX /NX0/N /NP /ND /NW
3.10 File Name Case Control /NC0 /NCL /NCU /NCX
3.11 File Time Treatments /FA /FC /FL /FU /FW /FF
3.12 Timestamp Control /TTA /TC /TCA /TCC /TCW
3.13 Time Zone Adjustments /TD /TS
3.14 File Attributes /AC /R /K /KD /KN /KS
3.15 Compression Control /KCFx /KCDx
3.16 Limiting the Size in Copying /TR
3.17 File Removal /Z /ZY /RC /RS /RD /RX
3.18 Quota on File Operation /QF /QBL /QBT /QSL /QST
3.19 Verify After Copy /V /V0 /V1 /V2
3.20 Cyclic Copy Handling /CC /CC0 /CCY /JCYCLIC
3.21 Security Information /SC /SF
3.22 Checking Remaining Space /CK /CK0
3.23 Prompt Control /YY/I/W/WS/WE/P/PC/PN/Po/Y/PD/PJ/PM/PP/PR/PW/PZ/ZY/RxY/CCY
3.24 Warning Control /WD /WL /WN /WR /WU
3.25 Pathname Length Control /VL
3.26 Safe File Overwrite /So
3.27 Copy Buffer Size /ZB
3.28 Versioning Control /JV
3.29 File Share Control /SH
3.30 Progress Bar /PB /PBH /PBH0
3.31 List Tree /LTREE
3.32 Error Handling /C /CB /CBQ /CR /CE
3.33 Check Condition /IA /IP /ILS /ILD
3.34 Debug and Test /DEBUG /DEBUGX
3.35 Cache Control /CA
3.36 Miscellaneous /ER /NI /SP /MD
3.37 Help /? /HELP /HELPA /HELPE
3.38 Installation /SKIPIC /SKIPXC
4 Command Entries
4.1 Environment Variables XXCOPY XXCOPYX COPYCMD
4.2 Environment Variable Control /ZE /ZX /ZX0
4.3 Command File /CF
4.4 Macro Reference /$xxxx$
4.5 Environment Variable /%xxxx%
4.6 Offset for Macro Time Values /TM0/TM+/TM-
------------------------------------------------------------------------
Notation:
In this article, minor variations which are designated by
additional suffix letters are collectively denoted by one or
more lowercase x (such as Lxxx). Literal character X in the
command switch is shown in uppercase X.
With only a few rare exceptions, XXCOPY's command switches
are case-insensitive. In order to help you distinguish the
letter O (Old) from the digit 0 (zero), the lowercase o is
used in this article for the switch alphabet which is more
distinct than the uppercase counterpart in most fonts.
=================================================================
1. Action Selector Group:
Once upon a time, XXCOPY was just a file copy utility.
Now, it is a multi-function file management tool. The
switches in this group specify what is the primary goal
of the current job.
1.1 Copy (default)
/CoPY Copies files/directories (default).
This switch exists mostly for a figurative reason.
Since it is the default mode of operation, most
users do not type this switch. Even our command
line examples do not show this.
1.2 Move (copy-and-delete)
Windows allows a "true" move to take place only within the
same volume (/MVF). To move a file outside the volume
requires a copy-then-delete-from-source operation (/RC).
/MVX is a hybrid function that performs the "true" move
(/MVF) if possible and falls back to the remove-after-copy
(/RC) operation as needed. The /MVD function is for
directories. /MVF and /MVD can be specified in one command
to move both files and directories.
/MVD Moves directories.
/MVF Moves files (within the same volume).
/MVX Moves files (to any destination).
/RCx Removes after a successful copy.
1.3 Remove
This group has three variations of file remove
operation depending on the location of the files.
/RSx Removes files/directories from the source.
/RDx Removes files which would be overwritten.
/RXx Removes files that are not in the source.
/RMDIR Similar to the DELTREE utility. Same as /RS/S/H/R/PD0.
1.4 Modify-Attributes
/AA Sets the Archive bit.
/AZ Clears the Archive bit.
/ANxxx Sets the whole file attributes with a new value.
/ASxxx Sets the selected file attribute bits.
/ARxxx Resets the selected file attribute bits.
/ASDxx Sets the selected dir attribute bits.
/ARDxx Resets the selected dir attribute bits.
1.5 SFN/LFN adjustment
/NL Attaches a long filename to the files in destination.
/NS Attaches a short filename to the file in destination.
1.6 Installation and license
/INSTALL Installs XXCOPY on a new computer (also for update).
/UNINSTALL Uninstalls XXCOPY from a computer.
/LICENSE Displays the license status.
/HOSTS Displays the list of remote hosts accessed by XXCOPY.
1.7 List/Find
The List/Find function is implemented as an Action
modifier to any operation in the Action Selector group.
When an /L switch is added to the command line,
the action will not be carried out except that the
result of file selection process will be shown using
the customized output format. This function does not
really belong here, but to the action modifiers
(Section 3.1). See XXTB #26 for detail.
/L<items> Lists the file without any file action.
/LTREE Lists directory tree (without copy or making directories).
/ZLX Lists the files and directories to be excluded (without any file action).
1.8 Make hard links/Unlink hard links
The MLH function creates a hard link of the source file in
the destination for each source file. The ULK function
unlinks hard links by converting each one of them into
a regular (non-hard link) file that is associated file data
of its own.
/MLH Makes hard Links in bulk.
/ULH Unlinks hard links (convert to regular fils)
1.9 Miscellaneous Actions
/NoP Performs no File Operations.
/WHICHX Identifies which XXCOPY program is invoked.
2. File Selector Group:
The switches in this group determines what files are to be operated
upon by the current action specified by the parameter in the
Action Selector Group.
The source specifier (2.1) and the /IN switch collectively determine
the set of files to be included in the operation. You may specify
as many /IN switches for more patterns as you like.
The remaining switches in the group all work in the principle of
elimination. When you specify more such switches, the more files
get eliminated from the set. You can consider each switch in this
category as a filter. XXCOPY offers a very wide range of filtering
mechanism to narrow down the choice for a particular operation.
2.1 Source Specifier (not a switch)
[ volume ] [ base_dir ] [ dir_pattern ] [ file_pattern ]
2.1.1 Volume Usually a drive letter (UNC allowed)
2.1.2 Base Directory The constant part without wildcard
2.1.3 Directory Template Wildcards (* and ?), multiple-level
2.1.4 Filename Template Wildcards (* and ?), filename pattern
This parameter in conjunction with the /IN switch
determines the entire inclusive scope of the directories
and files that will be subject to the file operation.
See XXTB #28 for detail.
2.2 By the characteristics of the source file
The switches in this group are concerned with the
characteristics of the files in the source (as opposed
to the switches in Group 2.3 which compare between the
files in the source and those in the destination).
2.2.1 by Alternate Filename
/IN<tmpl> Includes an alternate filename template (tmpl).
This is the only one in the entire XXCOPY command switch
whose effect is applied inclusively. That is, if you add
another /IN switch, it will add new set of files in addition
to the previous set of files for the operation.
2.2.2 by Exclusion
/X<xspec> Adds an exclusion specifier (xspec).
/EX<list> Specifies a text file with a list of xspecs.
See XXTB #05 for detail.
2.2.3 by File Date
The various /DAx switches are mutually exclusive one another.
The various /DBx switches are also mutually exclusive one another.
You may specify a /DAx and a /DBx at the same time which will
work together to bracket a range in time line to select files.
The /Do switch can be considered as a combination of /DAx and /DBx
with the same date specifier which determine a single file date
which qualifies the files for operation.
/D:<date> Same as /DA:<date>.
/DA#<n> Copies files that were changed on or after n days ago.
/DA:. Copies files that were changed today or later.
/DA:<date> Copies files that were changed on or after the specified date.
/DA:<time> Copies files that were changed on or after the date and time.
/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.
/DB:<time> Copies files that were changed on or before the date and time.
/Do#<n> Copies files that were changed on the day of n days ago.
/Do:. Copies files that were changed today only.
/Do:<date> Copies files that were changed on the specified date.
2.2.4 by File Size
The file size qualifier switches sets the low limit or high
limit or both to select files. Only the last such switch will
prevail if multiple switches from this group are specified.
/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).
2.2.5 by File Attributes
The /ATxxxx and /AXxxxx switches let you specify any
combination of file selection using the file attributes
as the key. The popular switches, /H and /A are
two most common ones.
/H Copies hidden and/or system files also.
/H0 Excludes hidden and/or system files (default). (same as /AXH/AXS)
/Ho Copies hidden and/or system files only. (same as /ATHS)
/A Copies only files with the archive attribute set. (same as /ATA)
/M Copies only files with the archive attribute set. (similar to /ATA)
/AT<mask> Selects files by the attribute bits (ACHSR).
/AX<mask> Excludes files with the specified attribute bits (ACHSR).
/A0 Ignores the archive attribute bit and does not change it.
2.2.6 By J-thingy (Reparse Point and Hard Link) type
The "J-thinginess" (i.e., the type of reparse point, etc.) can also
be a criterion for selecting the objects to be processed.
For example, you may list only J-thingies (non-regular) files (/JXF),
or, copy only junction points (/JIP). Although XXCOPY's file-selection
mechanism is based on exclusion with the command switches in this
section (i.e., all the /JIxxx switches), it is difficult to list all
types of J-thingies to exclude when you have only one or two types to
include. For this reason, the J-thingy inclusion switches are provided
(but XXCOPY still converts /JIM into /JXFHSLP).
The /JX switch may accept one or more alphabet
/JX<jjj> Excludes J-thingies listed.
/JX:F Excludes regular Files (selects J-thingies only).
/JX:R Excludes reparse points (selects regular files and hd links only).
/JX:J Excludes regular Files (selects regular files only).
/JI<jjj> Includes J-thingies listed.
/JI:F Includes regular files only (no J-thingies).
/JI:R Includes reparse points only (no regular files, hard links).
/JI:J Includes J-thingies only (no regular files).
2.3 By comparison with the file in destination
The switches in this group select files based on the
comparison between the files in the source and those in
the destination. They are often used for periodic backup
and directory synchronization purposes. These switches
were originally created as variations of directory backup.
They are also convenient for selecting files for deletion.
2.3.1 by Presence/Absence
The /BB and /U switches are the two switches which select
files by the pure presence or absence as the criteria.
Other switches in the this group (Group 2.3) are also
affected by the file in the destination, but for a
particular characteristics for comparison's sake.
/BB Selects files that are present in source but not in destination.
/U Selects files that are present in both source and destination.
2.3.2 by File Date
The files in the source and in the destination are
compared by their date (the Last-written date by
default --- see /FC for more info).
/BN Backs up newer files only (includes brand new files).
/Bo Backs up older files only (includes brand new files).
/BX Backs up different-date files (includes brand new files).
/D Same as /DA.
/DA Copies newer files and brand new files.
/DB Copies older files and brand new files.
/DS Copies same date/time files only.
/DX Copies different-date files only.
/DA and /BN are basically the same. Similarly,
/DB and /Bo are basically the same. Why does XXCOPY
provide the redundant sets of switches? This is
something to do with the mutual exclusivity of switches.
The Backup-related switches (/Bxx) are mutually exclusive
and cannot have two ways to run a backup operation. For
example, if you use /BZ (see below), you may not use the
/BN switch at the same time (then you can use /DA).
Similarly, when you use a /DA# switch, you cannot use
the /DA switch (then, you can use /BN).
2.3.3 by File Size
You may use the relative file size as the file
selection criteria. The switches listed below are
mutually exclusive.
/BZ Same as /BZX
/BZE Backs up equal-size files (includes brand new files).
/BZL Backs up larger-size files (includes brand new files).
/BZS Backs up smaller-size files (includes brand new files).
/BZX Backs up different-size files (includes brand new files).
2.3.4 by Combination
We advocate the use of the combination of file size
and file time as the file selection criteria for
incremental backup job (/BI). We think this scheme is
more reliable than the use of the Archive bit (which may
be inadvertently altered by another application).
/BI Backs up incrementally, different (by time/size) files only.
/BA Backs up incrementally, different (time/size/attr) files only.
/BE Selects exactly the same files and brand new files in src.
/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)
/CLONE Duplicates a directory (volume). Same as /KS/H/E/R/Q/Y/BI/ZY/ZE
2.3.5 by File Data
The file contents (byte sequence) can be a selection criterion,
albeit it is somewhat more time-consuming operation than the
other ones. The /CDM, /CDU and /CDX switches implicitly use
the file-size comparison (/BZE or /BZX) function since if a
match in file data requires that the two files match their size.
/CDM Selects files whose data matches byte-by-byte.
/CDU Selects files whose data unmatches and brand new files.
/CDX Selects files whose data matches and brand new files.
3. Action Modifier Group:
The switches that have been discussed above are very systematically
designed. Indeed, many of them are quite inevitable features for
a complete file management tool such as XXCOPY. On the other hand,
the action modifiers listed in this group are not so systematic.
They are a result of evolutionary process where we responded to user
requests. The nature of the switches in this broad group is that the
presence of the switch alters the behavior of the XXCOPY operation
one way or another. Since the backward compatibility is important
to long time users, the switch letter assignments are not optimum
for mnemonic purposes at times. The main reason why they are listed
together in this group is that they are not part of the file-selection
mechanism.
Fortunately, the switches listed here are mostly optional and
you can operate XXCOPY without the full knowledge of them.
You may take time to digest the list over a long period of time,
or you may simply forget most of these and come back later.
Some of the parameters that follow the command switch are not
always shown in this listing. The alphabetic listing has full
explanation of the parameters XXTB #26.
3.01 Console Output
/EC Echoes the entire command line (after macro processing).
/ZS Disables the sign-on message and statistics output.
/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.
/F Displays full source and destination filenames while copying.
/L<items> Lists the files which would be affected (no other actions).
See 3.1x (/FM<items>) for specifications of items.
/oFn See the following section (also for /oDn/oEn/oIn/oPn/oSn/oXn).
3.02 Screen and Log File output control
/oBx Brief Switch list (as opposed to the long parameter list by /oPx).
/oCx Cyclic reparse point list (<LNK><JCT><MNT>).
/oDx Deleted-file list (by a /Z or /ZY switch).
/oEx Error summary with the system error code.
/oFx File list (files that are successfully operated on).
/oHx Hard link list (all files that shares the same file data).
/oIx Include-item list.
/oPx Parameter list (as opposed to the breif switch list by /oBx).
/oSx Skipped-file list (with the reason for skip).
/oXx Exclude-item list.
The suffix (n) will have the following effects:
0: no output
1: Screen only
2: Log file only
3: Screen and Log file both
3.03 Screen and Log File output format
/oQ Surround pathname with a pair of quotation marks.
/oR Displays the taret path of reparse point.
/WI Specifies the width of the console display and log file (/oA/oN).
3.04 Log File and List File
/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.
/Fo<fname> Displays full source and filenames and also saves into a file.
/FM<items> Specifies the output line format (also applies to /L format).
For items, use one or more of the followings.
D file date
T file time
Z file size in bytes
A file attributes (A, H, S, R)
S short name (8.3)
L long name with full directory path
N long name without path
P parent path
R relative path
3.05 Subdirectories
/S Copies directories and subdirectories except empty ones.
/E Copies directories and subdirectories, including empty ones.
/T Creates directory structure, but does not copy files.
/ED Preserves an empty directory on /Z, /RC, /RS, /RD, /RX cases.
/ED0 Deletes empty directories (default).
/ED<n> Preserves n levels of empty subdirectories.
/DL<n> Limits processing of directories to n levels.
3.06 File Gathering
/SG Same as /SGN (see variations in handling duplicates below).
/SGF Gathers files into one-level directory (unsorted First file 1st).
/SGL Gathers files into one-level directory (unsorted Last 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).
/SGLo Gathers files into one-level directory (Last only).
/SGNo Gathers files into one-level directory (Newest only).
/SGoo Gathers files into one-level directory (Oldest only).
3.07 Directory Flattening
/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 char for /SL, /SX and /SR.
3.08 J-thingy Handling
/JJ Shortcut for /JL/JM/JP/JS/JH (all J-thingies).
/JJ0 Shortcut for /JL0/JM0/JP0/JS0/JH0 (no J-thingies).
/JR Shortcut for /JL/JM/JP/JS (all reparse points).
/JR0 Shortcut for /JL0/JM0/JP0/JS0 (no reparse points).
/JH Treats file hard links as hard links.
/JH0 Treats file hard links as regular (non-hard link) files.
/JL Treats directory symbolic links as symbolic links.
/JL0 Treats directory symbolic links as regular directories.
/JM Treats volume mount points as volume mount points.
/JM0 Treats volume mount points as regular directories.
/JP Treats junction (non-mount) points as junction points.
/JP0 Treats junction (non-mount) points as regular directories.
/JS Treats file symbolic links as symbolic links.
/JS0 Treats file symbolic links as regular (non-link) files.
3.09 File Name Treatments
/NX Preserves the shortname when the file is copied (default).
/NX0 Disables the /NX switch (good for remote volume, DirectCD, etc.).
/N Uses the short (8.3) name for name matching, and creation.
/N0 Uses the longname for name matching, and creation (default).
/NP Uses precise name matching (ignores the match in alias).
/NP0 Uses loose name matching (either longname or alias -- default).
/ND Uses the old (DOS) wildcard treatment.
/NW Uses the new (Win32) wildcard treatment (default in XXCOPY).
3.10 File Name Case Control
/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 shortname-file is created.
3.11 File Time Treatments
/FA Uses the Last-Access timestamp for Filetime comparison.
/FC Uses the Creation timestamp for Filetime comparison.
/FL Filetime in Local time (default).
/FU Filetime in UTC (Universal Coordinated Time - same as GMT).
/FW Uses the Last-Write time for Filetime comparison (default).
/FF Fuzzy Filetime, ignores +/- 2 seconds in Filetime difference.
/FF<n> Fuzzy Filetime, same as /FF+<n>/FF-<n>.
/FF+<n> Allows difference up to plus n seconds for matching filetime.
/FF-<n> Allows difference up to minus n seconds for matching filetime.
3.12 Timestamp Control
/TTA Touches (modifies) timestamp of Last Access of src.
/TTA0 Preserves timestamp of Last Access of src (default).
/TC Shortcut for /TCA/TCC/TCW.
/TC0 Shortcut for /TCA0/TCC0/TCW0.
/TCA Copies the timestamp of Last Access from src to dst.
/TCC Copies the timestamp of Create Time from src to dst.
/TCW Copies the timestamp of Last Write from src to dst (default).
/TCA0 Uses current time for dst Last Access (default).
/TCC0 Uses current time for dst Create Time (default).
/TCW0 Uses current time for dst Last Write.
3.13 Time Zone Adjustments
/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.
3.14 File Attributes
/AC Clears the archive bit of the source after it is copied.
/R Allows overwrite or delete of read-only files.
/R0 Cancels overwrite/delete of read-only files.
/K Keeps the source attributes including read-only (same as /KS).
/KD Keeps the attributes of destination (overwritten) file.
/KN Sets the destination attributes to normal (only /A).
/KS Keeps the src attributes including the read-only bit.
3.15 Compression Control (the C-bit of the File Attributes)
/KCDP Sets dst dir's C-bit with that of its parent dir.
/KCDD Keeps dst dir's C-bit, a new dir gets its parent's C-bit.
/KCDS Sets dst dir's C-bit with that of src dir's C-bit.
/KCDC Always sets the C-bit of dst directory (compress).
/KCDU Always resets the C-bit of dst directory (uncompress).
/KCFP Sets dst file's C-bit with that of its parent dir.
/KCFD Keeps dst file's C-bit, a new dir gets its parent's C-bit.
/KCFS Sets dst file's C-bit with that of src file's C-bit.
/KCFC Always sets the C-bit of dst file (compress).
/KCFU Always resets the C-bit of dst file (uncompress).
3.16 Limiting the File Size in Copying.
/TR<n> Truncates the newly copied files (first n bytes are copied).
3.17 File Removal
/Z Deletes extra files or subdirectories in destination.
/ZY Same as /Z except there is no confirmation prompt.
/RC Removes files in src after a successful copy (equivalent to move).
/RS Removes files in src (see Section 1.2.2 of Action section).
/RD Removes files in src (see Section 1.2.3 of Action section).
/RX Removes files in src (see Section 1.2.4 of Action section).
3.18 Quota (counting) on File Operation
/QF<n> Quits when the quota for the file count has been reached.
/QBL<n> Quits before the byte count exceeds the limit.
/QBT<n> Quits when the total byte count reaches the trigger point.
/QSL<n> Quits before the remaining space dips below the limit.
/QST<n> Quits when the remaining space reaches the trigger point.
3.19 Verify After Copy
/V Verifies after copy; default (same as /V1).
/V0 Disables verify switch (canceling /V, /V1, /V2, or /V3)
/V1 Verifies after copy (quick test --- file size match).
/V2 Verifies after copy byte-by-byte check.
3.20 Cyclic Copy Handling
/CC Prompts you when a cyclic copy is attempted.
/CC0 Disallows cyclic copy.
/CCY Allows a cyclic copy by excluding destination (default).
/JCYCLIC Scans the src dir for cyclic links (<LNK><JCT><MNT>), no copy.
3.21 Security Information (NTFS only)
/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).
3.22 Checking Remaining Space
/CK Checks remaining space before copy (default).
/CK0 Disables the pre-check of remaining space before copy.
3.23 Prompt Control
/YY Suppresses ALL prompts unconditionally (good in batch file).
/Y Overwrites existing files without prompting (same as /Po0).
/Y0 Cancels the /Y switch. (same as /Po).
/-Y Cancels the /Y switch (XCOPY compatible syntax).
/I Suppresses the prompt before creating the destination directory.
/I0 Prompts you before creating the destination directory if absent.
/W Same as /WE (Prompts you before proceeding).
/W0 Cancels the /W, /WS, or /WE switch.
/WS Prompts you to press a key at the start of copying.
/WE Prompts you to press a key at the end of copying.
/P Prompts you before creating each destination file.
/P0 Cancels the /P specified earlier.
/PC Prompts you before creating a new files.
/PC0 Creates a new file without prompting.
/PD Prompts you on a directory (default on destructive operations).
/PD0 Suppresses the prompt before a processing of directory.
/PJ Prompts before a different type dst is overwritten (default).
/PJ0 Suppresses the warning for trans-overwrite (different type).
/PM Prompts before deleting existing file at the move destination.
/PM0 Suppresses prompts on deleting existing file at move destination.
/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).
/PP Enables the space bar press-for-pause feature (default).
/PP0 Disables the space bar press-for-pause feature.
/PR Prompts on removing a file whose path contains reparse pt (default).
/PR0 Does not prompt before removing a filw with reparse point path.
/PW Enables Prompt with Dialog Window.
/PW0 Disables Prompt with Dialog Window (default).
/PZ Prompts for confirmation of dst directory on /Z /ZY /CLONE.
/PZ0 Suppresses prompt for directory confirmation on /CLONE /Z /ZY.
/RSY /RS action without the warning on file delete.
/RCY /RC action without the warning on file delete.
/RDY /RD action without the warning on file delete.
/RXY /RX action without the warning on file delete.
/CCY /CC action without the warning on cyclic copy.
/ZY /Z action without the on deleting extra files.
3.24 Warning Control
/WD Warns you when a root-level directory is missing (default).
/WD0 Suppresses the warning generated by the /WD setting.
/WL Displays a warning when a path length exceeds the limit.
/WL0 Suppresses warning for a path length that exceeds the limit.
/WN Displays a warning on failure on SFN-preservation in file copy.
/WN0 Suppresses warning on failure on SFN-preservation in file copy.
/WR Displays a warning when src or dst specifier contains a reparse point.
/WR0 Suppresses warning on src/dst specifier that contains a reparse point.
/WU Displays a warning when an unnecessary destination specifier is present.
/WU0 Suppresses warning on unnecessary destination specifier.
3.25 Pathname Length Control
/VL Sets the maximum path length (for NTFS volumes only).
3.26 Safe File Overwrite
/So Enables Standard Safe File Overwrite (same aos /So1).
/So0 Disables Safe File Overwrite.
/So1 Enables Standard Safe File Overwrite (default).
/So2 Enables Very Safe File Overwrite (always via temporary file).
3.27 Copy Buffer Size
/ZB Sets the size of the file copy buffer (in bytes).
3.28 Versioning Control
/JV Archives existing dst file with a versioning number.
3.29 File Share Control
/SH Same as /SHRW.
/SH0 Disables any sharing (XXCOPY always accesses files exclusively).
/SHR Enables file-sharing for read-only with other programs.
/SHW Enables file-sharing for write-only with other programs.
/SHRW Enables file-sharing for rd/wr with other programs (same as /SH)
3.30 Progress Bar
/PB Shows Progress bar for the job (default file progress >= 1M).
/PB<n> Shows Progress bar with file progress if size >= n bytes.
/PBH Enables Progress bar Halt/Abort button (default).
/PBH0 Disables Progress bar Halt/Abort button.
3.31 List Tree
/LTREE Lists directory tree (without copy or making directories).
Note: with /LTREE, the /DA/DB/DO parameters apply on dir time.
3.32 Error Handling
/C Continues copying even if errors occur (default).
/C0 Terminates upon the first occurrence of a fatal error.
/CB Continues batch file if XXCOPY ended OK last time.
/CBQ Same as /CB except suppresses console output to end immediately.
/CR<n> Sets the retry period (n seconds, default = 3) on failed copy.
/CR0 Disables the retry attempt of a filed copy.
/CE Same as /CBQ/EC (most useful in batch file with @echo off).
3.33 Check Condition
/IA Continues if destination is absent (terminates if exists).
/IA<file> Continues if the specified file or dir is absent (terminates if exists).
/IP Continues if destination is present (terminates if absent).
/IP<file> Continues if the specified file or dir is present (terminates if absent).
3.34 Debug and Test
/DEBUG Shows the command parameters and prompts you to start.
/DEBUGX Exits immediately after showing the command parameters.
3.35 Cache Control
/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
3.36 Miscellaneous
/ER Emulates XCOPY's exit code (for ERRORLEVEL check in batch files).
/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).
/SP Spans the copy job over multiple destination (new volume).
/MD<dir> Make Directory (convenient to create a directory for log files).
3.37 Help
/? Shows a summary of the switches on one page (without a switch).
.../? Shows only relevant switches when other switches are present.
/HELP Shows the switches in detail (print this output).
/HELPA Shows the /HELP listing in alphabetical order.
/HELP /x Shows a portion of /HELPA for switches starting with letter x.
/HELPE Lists the Exit codes (ERRORLEVEL values) returned by XXCOPY.
3.38 Installation Control
/SKIPIC Skips the creation of XXCOPY Desktop icon on installation.
/SKIPXC Skips the installation of the XXCONSOLE utility.
4. Command Entries
4.1 Environment Variables:
XXCOPY Specifies command line (any switches except src or dst).
XXCOPYX Specifies exclusion specifiers (without the /X prefix)
COPYCMD /Y /-Y can be accepted (XCOPY compatible)
4.2 Environment Variable Control
/ZE Disables the use of all Environment Variables for XXCOPY.
/ZX Disables the use of the Environment Variable XXCOPYX.
/ZX0 Enables use of the Environment Variable XXCOPYX.
4.3 Command File
/CF Specifies a text file which contains command line text.
4.4 Macro Reference (XXTB #24) --- examples shown below
/$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".
/$YY-M-D$ Expands to 2-digityear-mo-dy (mon and day without leading zero).
/$HHNNSS$ Expands to hour minutes second --> "131530".
/$MON-DD$ Expands to month day --> "DEC-25".
/$Y$ Expands to last digit of the current year --> "2".
/$WWW$ Expands to day of the week --> "WED".
/$W$ Expands to ordinal number of day of week (0-6) --> "3".
/$IIII$ Expands to ISO 8601 Year value for Week number --> "2002".
/$II$ Expands to ISO 8601 Year value for Week number --> "02".
/$WK$ Expands to ISO 8601 Week number --> "W52".
/$K$ Expands to ISO 8601 Day-of-the-Week number (1-7) --> "3".
Note: The above examples are for 2002-12-25 13:15:30 (Wednesday).
Punctuation with ( . , - _ ' ! # % & @ ~ { } ` T ) may be used.
4.5 Environment Variable
// keep a common set of exclusion items in one place.
/%xxxx% Environment Variable reference in command files (/CF /EX).
4.6 Offset for Macro Time Values
/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.
© Copyright 2010 Pixelab, Inc. All rights reserved.