XXCOPY == Freeware == Ver 2.85.5a (c)1995-2004 Pixelab, Inc. ===== Invocation Syntax ===== XXCOPY src [ dst ] [ options... ] src Specifies the source file(s) or directory to copy. dst Specifies the destination directory (no file names). If dst ends with a trailing backslash, /I is assumed. When any pathname is specified with an embedded blank, the pathname must be surrounded by a pair of doublequotes. CAUTION: The following list of the command description is *NOT* designed for new users to learn the XXCOPY command set. To quickly locate a short description of a command switch, use the /HELPA command for the alphabetic listing. For a better organized listing, see XXTB #27 at: http://www.xxcopy.com/xxcopy27.htm ----- The following switches use file attributes to select files ----- /A Same as /ATA. Copies only files with the archive attribute set. Doesn't change the attribute. /M Copies only files with the archive attribute set. Turns off the archive attribute. /AT Selects files by the attribute bits (AHSR). You may use two or more /AT 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 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 Excludes files with the specified attribute bits (AHSR). You may use two or more /AX 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 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 and /AX switches have opposite conjugation rules (the effects of combining attribute bits --- AND and OR). /A0 Cancels *ALL* /A, /M, /AT, and /AX switches. ----- The following switches modifiy the file attributes ----- /AA Sets the src file archive bit (without actually copying). /AZ Clears the src file archive bit (without actually copying). Note: Both /AA and /AZ implicitly set /H (can be overridden). /AC Copies specified files irrespective of the archive attribute. Turns off the src archive attribute after XXCOPY is done. /AN Sets a new value to file attribute bits (replace the value). The value is a combination of letters, ASHR. /AR Resets file attribute bits (clears specified bits). /AS Sets file attribute bits (sets specified bits). Note: The value for /AR and /AS specifies attributes (AHSR) whose bits are either reset or set respectively to the existing file attributes. Unspecified attributes bits are kept unchanged. Note: The /AA, /AN, /AR, /AS 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.). ----- The following switches use other file attribute bits ----- /H Copies hidden and/or system files also. /H0 Excludes hidden and/or system files (default). /Ho Copies hidden and/or system files only. /R Allows overwrite/delete of read-only files. /R0 Cancels overwrite/delete of read-only files. /K0 Keeps the source attributes except read-only (default) /K Keeps the source attributes including read-only (same as /KS). /KS Keeps the source attributes including the read-only bit. /KD Keeps the attributes of destination (overwritten) file. /KN Sets the destination attributes to normal (only the A-bit). ----- The following switches are useful for backup and archive ----- /BI Backs up incrementally, different (by time/size) files only. /BB Backs up brand new files only (does not overwrite existing ones). /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). /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). /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 (a short form of /BACKUP). /B0 Undo any of /BI, /BB, /BN, /Bo, /BX, or /BZ switches. /U Updates the files that already exist in destination. /SP Spans the copy job over multiple destination (new volume). /CLONE Duplicates a directory (volume). This switch is a shortcut for the following combination: /KS/H/E/R/Q/Y/BI/ZY/ZE/oD0. /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. 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"). ----- The following switch adds inclusive alternate templates ----- /IN 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). ----- The following switches exclude directories or files ----- /X Adds an exclusion specifier (xspec) (see below for exclusion). /EX Specifies a text file which contains a list of xspecs (see below). 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): for file, [ dir_spec\ ] [ *\ ] [ ftemplate ] for dir, [ 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 second part 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. ----- The following switches limit files by the filetime ----- /D Same as /DA. /DA Copies newer files and brand new files. /DB Copies older files and brand new files. /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). /D: Same as /DA:. /DA: Copies files that were changed on or after the specified date. /DB: Copies files that were changed on or before the specified date. /Do: Copies files that were changed on the specified date. /DA# Copies files that were changed on or after days ago. /DB# Copies files that were changed on or before days ago. /Do# Copies files that were changed on the day days ago. 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#, /DB# and /DO#, the parameter 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 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. /DA:. Copies files that were changed today or later (same as /DA#0). /DB:. Copies files that were changed yesterday or earlier. /Do:. Copies files that were changed today only. /DA: and /DB: 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 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. /DA: