誰给讲讲XXCOPY的用法?????
XXCOPY16 Ver 2.44.4 (c)1995-2001 Pixelab, Inc.
XXCOPY16 src [ dest ] [ options... ]
src specifies the source file(s) or directory to copy
指定要拷贝的源文件或目录
dest specifies the destination directory (no file names)
指定目标目录(无需制定目标文件名)
Option switches start with a slash (/) immediately followed by letter(s).
选项
XXCOPY supports most XCOPY switches (/A/M/P/S/E/T/W/C/I/F/L/H/R/U/K/Y/N).
有以下选项
/S Copies subdirectories /K Keeps file attibutes as in src
拷贝时包括子目录 目标文件与源文件的属性保持一致
/H Copies hidden files also /U Updates files that exist in dest
拷贝时包括隐含文件 更新目标目录中已存在的同名文件
/CLONE Duplicates a directory (or entire volume) as incremental backup.
用增量备份的方式克隆目录(或卷)
/BU Backs up the directory without deleting extra files.
备份目录并且不删除多余的文件
/AA Sets the src file archive bit (without actually copying).
设置源文件的archive位(不真正作拷贝)
/AZ Clears the src file archive bit (without actually copying).
清除源文件的archive位(不真正作拷贝)
/SZ:-<n> Copies files whose size is <n> bytes or less.
拷贝文件大小小于或等于 n 个字节的文件
/Z Deletes extra files/dirs in the destination (/ZY, without prompt).
删除目标目录中多余的文件/目录
/DA :<date> (/DB:<date>) Copies files made on/after (before) the date.
/DA 拷贝文件日期在date中指定的日期(或其后)的文件; /DB 拷贝文件日期在date中指定的日期(或之前)的文件
/X<fspec> Excludes file(s) which match <fspec> pattern (wildcard OK).
不拷贝文件名与fspec指定的模式匹配的文件(可使用通配符)
/Y No prompt on file overwrite (/YY No user prompts of any kind).
/Y 在覆盖文件时不提示 /YY没有任何提示
/HELP Displays a full help text, (/HELPA in alphabetical order).
/HELP 显示帮助信息 /HELPA 按字母顺序显示帮助信息
/? Displays a focused help text with the switch(es) you specify.
显示某个指定选项的详细帮助信息
Over 160 switches in all (visit http://www.xxcopy.com/xxcopy/ for details).
共有超过160个选项,可访问 http://www.xxcopy.com/xxcopy/ 获取详细资料。
Exit code = 34 (Illegal commmand parameter)
返回值等于 34 表示非法命令行参数
**********************************************************************************************************
以下是更详细的帮助信息:
XXCOPY16 Ver 2.44.4 (c)1995-2001 Pixelab, Inc.
===== Invocation Syntax =====
XXCOPY16 src [ dest ] [ options... ]
src Specifies the source file(s) or directory to copy.
dest Specifies the destination directory (no file names).
If dest 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.
/? Shows a summary of the switches on one page.
... /? Shows related switches when entered with other switches.
/0 Disables DATMAN One-pass copy (not recommended, but allowed)
/1 DATMAN One-pass copy (when copying from DATMAN tape, default)
/A Same as /ATA. Copies files with the archive attribute set.
Doesn't change the attribute.
/A0 Ignores the archive attribute bit and does not change it.
/AA Sets the src file archive bit (without actually copying).
/AC Copies specified files irrespective of the archive attribute.
Turns off the archive attribute after XXCOPY16.
/AN<mask> Sets a new value to file attribute bits (replace the value).
The <mask> value is a combination of letters, ASHR.
/AR<mask> Resets file attribute bits (clears specified bits).
/AS<mask> Sets file atttribut bits (sets specified bits).
Note: The <mask> 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.
/AT<mask> Selects files by the attribute bits (AHSR).
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 (AHSR)
You may use two or more /AT<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 /AT<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 and /AZ switches modifies the file
attributes without copying the files to the destination.
whereas the /A, /AT and /AX switches selects files by the file
attributes for various operation (copy, list, remove, etc.).
/B0 Undo any of /BI, /BB, /BN, /Bo, /BX, or /BZ switches.
/BB Backs up brand new files only (does not overwrite existing ones).
/BI Backs up incrementally, different (by time/size) files only.
/BN Backs up newer files only (includes brand new files).
/Bo Backs up older files only (includes brand new files).
/BS Selects exactly the same files (this is useful with /RS).
/BU Standard Backup switch (same as /r/i/bi/q/c/h/e/v/y)
/BX Backs up different-date files (includes brand new files).
/BZ Same as /BZX
/BZE Backs up equal-size files (includes brand new files).
/BZS Backs up smaller-size files (includes brand new files).
/BZL Backs up larger-size files (includes brand new files).
/BZX Backs up different-size files (includes brand new files).
/C Continues copying even if errors occur (default).
/C0 Disables the /C switch (terminates upon error).
/CB Continues batch file if XXCOPY16 ended OK last time.
/CBQ Same as /CB except suppresses console output to end immediately.
/CB0 Cancels the /CB and /CBQ switches.
/CR<n> Sets the retry period (n seconds, default = 3) on failed copy.
/CC Warns a cyclic copy with a Y/N prompt.
/CC0 Disallows cyclic copy (src includes the dst directory) (default).
/CCY Allows a cyclic copy by excluding the destination from the src.
/CE Same as /CBQ/EC (most useful in batch file with @echo off).
/CK Checks remaining space before copy (default).
/CK0 Disables the pre-check of remaining space before copy.
/CLONE Duplicates a directory (volume). Same as /KS/H/E/R/Q/Y/BI/ZY/ZE
/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.
/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.
/DEBUG Shows the command parameters and prompts you to start.
/DEBUGX Shows the command parameters and exits.
/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.
/DS Copies same date/time files only.
/DX Copies different-date files only.
/DA:<date> and /DB:<date> 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 are with
2-digits, 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 fixx+les using
both date and time whereas /DA:<date> and /DA#<n> use date only.
/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 an empty directory on /Z, /RC, /RS, /RD, /RX 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.
/G<n> Sets DATMAN N-Group (redundant) write. (<n> : 0 - 7).
e.g., /G1 writes the same data twice on DATMAN tape.
/H Copies hidden and/or system files also.
/H0 Excludes hidden and/or system files (default).
/HELP Shows the switches in detailed (print this output).
/HELPA Shows the /HELP listing in alphabetical order.
/HELPE Lists the Exit codes (ERRORLEVEL values) returned by XXCOPY16.
/Ho Copies hidden and/or system files only.
/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).
/IP Continues if destination is present (terminates if absent).
/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 baskslash in the teplate, but wildcard characters are OK).
/J Forces DATMAN catalog (journal) flush.
/J0 Suppresses DATMAN's automatic catalog (journal) flush.
/J1 Flushes DATMAN catalog when needed (default).
/J2 Flushes DATMAN catalog unconditionally at the end.
/K Keeps the source attributes including rdonly (same as /KS).
/K0 Keeps the source attributes except rdonly (default)
/KD Keeps the attributes of destination (overwritten) file.
/KN Sets the destination attributes to normal (only /A).
/KS Keeps the src attributes whose RDONLY bit is normally reset.
/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 sting of one or more of the following letters
which selects the combination and the output order.
D file date
T file time
Z file size in bytes
A file attributes: A(rchive),H(idden),S(system),R(eadonly).
S short name (8.3)
L long name with full directory path
Note: When S or L is missing, L is assumed to be the last item.
/M Copies files with the archive attribute set.
Turns off the archive attribute.
/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). /o0 Cancels the /oN or /oA switch specified earlier
/oA<fname> Appends to a logfile, reporting errors. (does not overwrite log).
/oE Displays the system error code after a failure (default).
/oE0 Suppresses the error code display after a copy failure.
/oN<fname> Outputs a new logfile, reporting errors (make a new log) file.
/oP Reports command switch parameters (also to logfile if enabled)
/oX Reports the exclusion parameters (also to the logfile if enabled)
/P Prompts you before creating each destination file.
/PD Prompts you before starting each directory with options for...
Y (Yes), N (No), A (All), R (Remaining dirs), S (This & subdirs)
/Q Same as /Q1. Does not display files which are skipped.
/Q0 Displays all file names.
/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.
/R Overwrites read-only files.
/R0 Undo any of /RC, /RS, RD, or /RX switches
/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: /PD and /PD0 control additional prompt on each directory.
/S Copies directories and subdirectories except empty ones.
/SG Same as /SGN (see variations in handling duplicates below)
/SGF Gathers files into one-level directory (unsorted First file 1st)
/SGN Gathers files into one-level directory (sorted, Newest file 1st)
/SGo Gathers files into one-level directory (sorted, Oldest file 1st)
/SGFo Gathers files into one-level directory (First only)
/SGNo Gathers files into one-level directory (Newest only)
/SGoo Gathers files into one-level directory (Oldest only)
/SG0 Cancels file-gather switches (/SG...)
/SP Spans the copy job over multiple destination (new volume).
/SZ<n> Limits the copy size (only the first n bytes are copied).
/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
/T Creates directory structure, but does not copy files. It copies
all directories including empty ones (implicitly sets /E).
/U Updates the files that already exist in destination.
/V Verifies after copy default (same as /V1).
/V0 Disables verify switch (canceling /V, /V1, or /V2)
/V1 Verifies after copy (quick test --- file size match).
/V2 Verifies after copy byte-by-byte check (DATMAN 2-pass).
/VE Displays only error cases of DATMAN 2-pass verify (/V2)
/VX<fname> Exclude verify error output for the file specified.
/W Prompts you to press a key at the start of copying.
/WD0 Suppresses warning for copying a non-directory source.
/WD Prompts with a warning for copying a non-directory src (default).
/WE Prompts you to press a key at the end of copying.
/WS Same as /W.
/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 (::) start a comment field which
ends at the end of the line
. You may specify more than one 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 ending (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 prompting (See /BB).
/-Y Prompts you before overwriting existing files.
/Y0 Same as above (/-Y).
/YY Suppresses ALL prompts unconditionally (good in a batch script).
/Z Deletes extra files or subdirectories in destination.
/ZE Disables the use of all Environment Variables for XXCOPY16.
/ZS Disables the sign-on message and statistics output.
/ZX Disables the use of the Environment Variable XXCOPY16X.
/ZX0 Enables the XXCOPY16X settings. Good for /CLONE and /RMDIR.
The shortcut /CLONE and /RMDIR contain /ZE as a component.
e.g., /CLONE/ZX0 allows the use of XXCOPY16X settings.
/ZY Same as /Z except there is no confirmation prompt.
/$xxxx$ Pre-defined macros for current date and time which may appear
anywhere in the command argument and other XXCOPY paramters.
Examples below are for the current time, Dec 25, 2001 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 --> "011225"
/$YYYY-MM$ Expands to 4-digit year month --> "2001-12"
/$HHNNSS$ Expands to hour minutes second --> "131530"
/$MON-DD$ Expands to month day --> "DEC-25"
Summary XXCOPY16 switches that check two directories: -------
/ src \
Files are classified into four groups; | ---+---
--------------------------------------------- | / B | \
A files in src which do not exist in dst | A | | D |
B files in src which also exist in dst \ | C / |
C files in dst which also exist in src ---+--- |
D files in dst which do not exist in src \ dst /
-------
/BB all files in A (none in B)
/BI all files in A plus files in B that are different in filetime or size
/BX all files in A plus files in B that are different in filetime
/BZX all files in A plus files in B that are different in size
/BZL all files in A plus files in B that are larger
/BZS all files in A plus files in B that are smaller
/BZE all files in A plus files in B that are the same size
/BN all files in A plus files in B that have newer filetime
/Bo all files in A plus files in B that have older filetime
/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) includes 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.
+---------------------------------------------------------------+
| Freeware Version (for persnal use or product evaluation) |
| For routine commercial usage in a corporate environment, |
| please acquire a Corporate Site License from Pixelab, Inc. |
| |
| (c)1995-2001 Copyright Pixelab, Inc. All rights reserved. |
| Originally programmed by Kan Yabumoto <yabumoto@datman.com> |
| For the latest version, visit http://www.datman.com/xxcopy/ |
| Pixelab, Inc. http://www.datman.com/ Fon: 1+630-369-7112 |
| 1212 S. Naper Blvd., Suite 119, Naperville, IL 60540 U.S.A. |
+---------------------------------------------------------------+