XXCOPY
[ Back to Table of Contents ] [ << ] [ >> ]

XXCOPY TECHNICAL BULLETIN #26


From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: XXCOPY Command Reference Alphabetic Listing
Date:    2010-01-01  Revised for ver 3.00.0
===============================================================================

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.

         /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.

   /ADDHOST:<id>  Add a new computer name in the host list.

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

  /AR<mask>  Resets file attribute bits (clears specified bits).
             The <mask> value is a combination of letters, ACHSRo.

 /ARD<mask>  Resets directory attribute bits (clears specified bits).
             The <mask> value is a combination of letters, ACHSRo.

  /AS<mask>  Sets file attribute bits (sets specified bits).
             The <mask> value is a combination of letters, ACHSRo.

 /ASD<mask>  Sets directory attribute bits (sets specified bits).
             The <mask> value is a combination of letters, ACHSRo.

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

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

             The letters that denote file attributes are as follows

                A      Archive
                C      Compression
                H      Hidden
                S      System
                R      Read Only
                o      Off-Line


  /AT<mask>  Selects files by the attribute bits (ACHSR).
             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 (ACHSR).
             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  Cancels any of /BI, /BA, /BB, /BN, /Bo, /BX, or /BZ switches.

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

        /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).

       /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).

    /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

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

       /CB0  Cancels the /CB and /CBQ switches.

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

        /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.

       /CD0  Does not compare file data byte-by-byte (default).

       /CDM  Selects files whose data match in byte-by-byte comparison.

       /CDU  Selects files whose data unmatch and brand new files.

       /CDX  selects files whose data match byte-by-byte and brand new files.

        /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
                H   history (creation, last-write, last-access timestamps)
                Z   file size in bytes (or J-thingy type)
                A   file attributes: A(rchive),H(idden),S(system),R(eadonly)
                S   short name (8.3)
                N   long name (lastname) without path
                L   long name with full directory path
                P   parent path name without the lastname
                R   long relative (below base directory) name
                J   J-thingy object type
                ,   comma as a separator (for a CSV format output)

             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.

             Note: For CSV output, use commas liberally and add /oQ.

        /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.

        /GX  Accepts the (...\?\*) ending in special (now-obsolete) way.

       /GX0  Disables the obsolete syntax (...\?\* treated in regular way).

         /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.

        /JH  Treats file hard links as hard links (default).

       /JH0  Treats file hard links as regular files.

  /JI<mask>  Includes the specified J-thingies (inverse switch of /JX).
      Note:  The <mask> specifies one or more J-thingies (FSHLMP).
             E.g., /JIM is equivalent to /JXFHLPS (D is not excluded).

       /JIJ  Same as /JXF  (selects <LNK>,<JCT>,<MNT>,[SYM] and [HLK]).

       /JIR  Same as /JXFH (selects <LNK>,<JCT>,<MNT> and [SYM]).

        /JJ  Shortcut for /JL/JM/JP/JS/JH (default).

       /JJ0  Shortcut for /JL0/JM0/JP0/JS0/JH0.

        /JL  Treats directory symbolic links as symblic links (default).

       /JL0  Treats directory symbolic links as regular directories.

        /JM  Treats volume mount points as volume mount points(default).

       /JM0  Treats volume mount points as regular directories.

        /JP  Treats junction (non-mount) points as junction pts (default).

       /JP0  Treats junction (non-mount) points as regular directories.

        /JR  Shortcut for /JL/JM/JP/JS.

       /JR0  Shortcut for /JL0/JM0/JP0/JS0.

        /JS  Treats file symbolic links as symblic links (default).

       /JS0  Treats file symbolic links as regular files.

        /JV  Archives existing dst file with a versioning number (9999).

     /JV<n>  Archives existing dst file up to up to n versions.

       /JV0  Disables versioning by simply overwriting the existing file

  /JX<mask>  Excludes the specified J-thingies from normal processing.
      Note:  The <mask> specifies one or more J-thingies (FSHDLMP).

       /JX0  Processes all J-thingies without being excluded (default).

       /JXJ  Same as /JXLMPSH (excludes all J-thingies including HLNK).

       /JXR  Same as /JXLMPS  (excludes all reparse points (not HLNK)).

   /JCYCLIC  Scans the src and lists all cyclic links (<LNK><JCN><MNT>).

         /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.

      /KCDP  Sets dst dir's C-bit with that of its parent dir (default).

      /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 (default).

      /KCFD  Keeps dst file's C-bit, a new file 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).

         /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
                H   history (creation, last-write, last-access timestamps)
                Z   file size in bytes
                A   file attributes: A(rchive),H(idden),S(system),R(eadonly).
                S   short name (8.3)
                N   long name without path
                L   long name with full directory path
                P   parent path
                R   relative path
                J   J-thingy object type
                ,   comma as a separator (for a CSV format output)

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

             Note: For CSV output, use commas liberally and add /oQ.

   /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).

       /MLH  Makes a hard link file in dst for each file in the src.

       /MVD  Moves directories (the src and dst must be in the same volume).

       /MVF  Moves files (the src and dst must be in the same volume).

       /MVX  Moves files, if fails then tries /RC (remove-after-copy).

         /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).

       /NoP  Performs no regular file operations (good for /MD, /WS, etc.).

        /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

       /oQ0  Disable quotation marks that surround pathname.

        /oR  Displays the target path of reparse point.

       /oR0  No display of the target path of reparse point.

     /oB<n>  Brief switch (both specified and default) list. 

     /oC<n>  Displays links (<LNK><JCT><MNT>) that are cyclically referenced.

     /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).

     /oH<n>  Displays the list of hard link(s) to the selected file if linked.

     /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 /oB/oD/oE/oF/oH/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 processing each directory

       /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 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).

       /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).

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

      Note:  /SGL and /SGLo is works well with other file-selection switches.
             E.g., /SGLo /BZL to gather the largest file of its kind.

       /SHR  Enables file-sharing for read-only with other programs (default).

       /SHW  Enables file-sharing for write-only with other programs.

      /SHRW  Enables file-sharing for rd/wr with other programs (same as /SH).

       /SH0  Disables any sharing (Exclusive file access only).

    /SKIPIC  Skips the creation of XXCOPY Desktop Icon (used with /INSTALL).

    /SKIPXC  Skips the installation of XXConsole (used with /INSTALL).

        /So  Enables Standard Safe File Overwrite (Same as /So1).

       /So0  Disables Safe File Overwrite.

       /So1  Enables Standard Safe File Overwrite (default).

       /So2  Enables Very Safe File Overwrite (always via temporary file).

        /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).


         /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).

        /TC  Shortcut for /TCA/TCC/TCW (copies all three types of timestamps).

       /TC0  Shortcut for /TCA0/TCC0/TCW0.

       /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.

         /U  Updates the files that already exist in destination.

       /ULH  Unlinks hard link files into regular (non hard link) files.

 /UNINSTALL  Uninstalls XXCOPY from your computer.

        /UT  Encodes output file(s) in UTF-8 text.

       /UT0  Encodes output file(s) in ANSI text (default).

         /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.

        /VL  Enables the Very Long Path (same as /VL32767).

     /VL<n>  Sets the maximum path length to n chars (up to 32767).

       /VL0  Disables the Very Long Path (default with 259 chars).

         /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).

    /WHICHX  Identifies which XXCOPY.EXE file is launced (no action).

     /WI<n>  Sets the output line width to n columns (default:auto).

        /WL  Issues a warning when a path length exceeds the limit (default).

       /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  Warns if src or dst specifier contains a reparse point (default).

       /WR0  Suppresses warning for src or dst specifier with a reparse point.

     /WU<n>  Prompts with a warning for unnecessary destination (default).

    /WU0<n>  Suppresses warning for unnecessary destination specifier.

   /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.

     /ZB<n>  Sets the size of the file copy buffer (in bytes).

       /ZB0  Cancels the buffer size setting (uses the default size).

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

       /ZLX  Enables exclusion test (displays only excluded objects).
             Note: /ZLX performs a 'dry-run' (like /L) without copying files.

      /ZLX0  Disables exclusion testing (default).

        /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".

  /$YY-M-D$  Expands to 2-digityear-mo-dy (mo and dy without leading zero).

  /$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
 /BA   all files in A plus  files in B that are diff. in filetime, size or attr
 /BX   all files in A plus  files in B that are different in filetime
 /BZE  all files in A plus  files in B that are the same 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
 /BZX  all files in A plus  files in B that are different in 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.



© Copyright 2016
Pixelab All rights reserved.

[ XXCOPY Home ] [ Table of Contents ] [ << ] [ >> ]

Join the XXCOPY group