随笔 - 49  文章 - 0 评论 - 19 
<2007年10月>
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

Web Site Traffic Counter

常用链接

留言簿(3)

随笔分类(48)

随笔档案(49)

搜索

  •  

积分与排名

  • 积分 - 62142
  • 排名 - 98

最新评论

阅读排行榜

评论排行榜

Introduction:

  Since we receive a large number of inquiries about XXCOPY's relative
  strength and weakness against ROBOCOPY, the administrator's tool
  bundled with Microsoft's Windows NT/2000/XP Reseource Kit, this article
  was created to contrast the two utilities.

  Apparently, ROBOCOPY (which stands for Robust Copy) and XXCOPY both
  come from Microsoft's XCOPY utility as the basis for the overall
  approach which of course comes from COMMAND.COM's built-in COPY
  command.  As its name implies, XXCOPY adheres to XCOPY's general
  behavior very closely.  This makes XCOPY user's initial experience
  with XXCOPY quite painless.  In general, XXCOPY is much closer to
  XCOPY than ROBOCOPY is to XCOPY.  Howerver, as the following chart
  shows, the two utilities have remarkable similarities.  Except for
  minor implementation differences, the designers of ROBOCOPY seem
  to have the same general mindset as XXCOPY's designer to the file
  management problems.


Common features:

Let us start with a list of common features (with sometimes different
switch letter)  which are nearly equivalent in the two programs.


Robocopy       XXCOPY      Comments
------------------------------------------------------------------------------
srcdir        srcspec      XXCOPY Allows wildcards anywhere any number
dstdir        dstdir       Destination specifier
file          ----         Part of srcspec to be XCOPY compatible
file...       /IN<file>    /IN allows additional filename patterns

/S            /S           Copy subdirectories
/E            /E           copy subdirectories even if its empty
/LEV:<n>      /DL<n>       Limit the number of directory levels

/MOV          /RC          Delete from source after copying
/MOVE         /RC/E        Delete from source after copying

/PURGE        /Z           Delete dst files/dirs that no longer exist in src
/MIR          /CLONE       Mirror a directory tree

/A+:<mask>    ----         Add the given Attributes to copied files.
/A-:<mask>    ----         Remove the given Attributes from copied files.

----          /KS/KD/KN    Keep the src attributes/dst attrib/sets new
----          /AC          Clear src archive bit

/CREATE       /CLONE/TR0   Create directory tree + 0-length files only.
/FAT          /N           Create destination files using 8.3 names.

/A            /A           Copy only files with the Archive attribute set
/M            /M           Like /A, but remove A-bit from source files.

/IA:<mask>    /AT<mask>    Include only files with some of the Attrib set.
/XA:<mask>    /AX<mask>    Exclude files with any of the given Attributes set.

/XF           /X<file>     Exclude Files matching given names/paths/wildcards.
/XD           /X<dir\>     Exclude Directories matching given names/paths.

/XC           /BS          Exclude changed files (backup only same files)
/XN           /BO          Exclude newer files   (backup only older files)
/XO           /BN          Exclude older files   (backup only newer files)
/XX           /Z           Exclude extra files
/XL           /U           EXclude Lonely files/dirs (update only existing ones).
/IS           /BI0         Include Same files (copy even if they may be same).

/MAX:<n>      /SZ:-<n>     Exclude files bigger than n bytes.
/MIN:<n>      /SZ:<n>-     Exclude files smaller than n bytes.

/MAXAGE:<n>   /DA#<n>      Exclude files older than n days/date.
/MINAGE:<n>   /DB#<n>      Exclude files newer than n days/date.
/LOG:<file>   /ON<file>    Output status to LOG file (overwrite existing log).
/LOG+:<file>  /OA<file>    Output status to LOG file (append to existing log).

/L            /L           List only (no copy, timestamp, or delete action)
/NP           /PB0         Enable/Disable progress display

/R:<n>        -----        Number of retries on failed copies
/W:<n>        -----        Wait time between retries: default is 30 seconds.
----          /CR<n>       In XXCOPY the retry period is specified in seconds.


/SEC          /SC          Copyies Security information.
/SECFIX       /SF          Fixes up security information without copy.

/X            ----         Report all extra files, not just those selected.
/V            ----         Produce Verbose output, showing skipped files.
----          /Q<n>        Control various quiet (verboseness) levels
----------------------------------------------------------------------------

  Note:  The comments above are mostly for ROBOCOPY user's
         convenience.  The terminology in the comment column is
         that of ROBOCOPY's.  For example, ROBOCOPY' manual refers
         to the files that is present in the source but not in the
         destination as a "Lonely" file.  Also, the way ROBOCOPY
         classifies files is almost always by comparing the source
         against destination.  Although many XXCOPY's switches in
         the backup group (starts with /B ) are in the category,
         XXCOPY does not always take the viewpoint (bias) in the
         file-selection process.  That is, whereas ROBOCOPY is
         apparently designed with the backup and archiving operation
         as its primary purpose, XXCOPY's functionality is wider in
         scope with more non-backup related file management operations
         (e.g., more selection in file-removal, file-gathering, etc.)



Features found only in ROBOCOPY:


ROBOCOPY
----------------------------------------------------------------------------
/Z                Copy file in restartable mode for quick retry later
/TIMFIX           Fix timestamps on existing destination files.
/REG              Save /R:n and /W:n in the Registry as default
/TBD              Wait for sharenames To Be Defined (retry error 67).
/ETA              Show Estimated Time of Arrival of copied files.

-----------------------------------------------------------------------------


Features found only in XXCOPY:


XXCOPY
-----------------------------------------------------------------------------
WildWildSrc       Wildcards anywhere any number in the source
/X*\dir*\         Exclusion dir may be in any level and with wildcards
/EX<file>         Exclusion specifiers supplied in a text file.
/CF               Command file which removes the size limit of command line.
/RS/RD/RX         Delete file/directory (not just a copy utility)
/DA#/DB#          File age specifier in Days, Hours, Minutes, or Seconds.
/CCY              handle a cyclic copy to proceed.
/SP               Span backup into multiple volume (for floppy, CD-RW)
/SX               Flatten a directory tree
/SG               Gather files into a directory
/Lxxx             List (/L) with a customized display format
/BZL/BZS/BZX/BZS  Backup if size is larger/smaller/different/same
/NX               Preserve short filename
/NL               Restore long filename after a SFN-only copy
/NS               Restore short filename
/NW/ND            Select filename-matching algorithm (Win32 vs DOS)
/NP               Precise filename matching (no alias-matching)
/FL/FU            Use Filetime in LocalTime/UTC-time
/FW/FA/FC         Use Filetime in Last-Write, Last-Access, Create
/FF               Fuzzy Filetime with adjustable margin in time comparison
/TR<n>            Copy first n bytes to the destination file
/ED/ED0           Delete/leave an empty directory when deleting
/CK/CK0           Enable/disable remaining-space check before copy
/IA/IP            Terminate if destination is absent/present
/CB/CQ            Continue batch (batch enhancer feature)
/NI<n>            Be nice to other tasks (add idle to ease CPU demand)
/ER               Report exit code in XCOPY-compatible mode
/V2               Verify a file-copy on a byte-by-byte comparison basis.
/SZ!<n>-<m>       Exclude range <n>-<m>  which ROBOCOPY can't do
/TS+/TS-/TD+/TD-  Time comparison with offset (inter-timezone synchronization)
/WS/WE/P/PD/PW/YY Control for user prompts on various occasions
/PC               Prompt on create (in addition to prompt on overwrite)
/PB               Progress Bar for the entire job
/PB<n>            Progress Bar for file with adjustable cutoff size.
/MD               Make Directory (mkdir) for log file, etc. within XXCOPY
/oX               Output the list of exclusion items after optimization
/xxxx/?           Smart help with a focused list of relevant switches
-----------------------------------------------------------------------------

Intangible differences:

1.  ROBOCOPY provides more detailed statistics than XXCOPY.

2.  ROBOCOPY provides percentage display on each file (but good for only
     a few very large files).  XXCOPY has progress bars for the entire
     job as well as single file copy with variable cutoff limit (shows
     progress only for large files).

3.  When you abort ROBOCOPY, it abruptly ends the whole job without
     any display of statictics thus far completed.

     When you abort XXCOPY, it first waits for the completion of the
     file copy in progress and provides statistics.

4.  Robocopy runs only under Windows NT/2000/XP, not in Win95/98/ME.

     XXCOPY runs under any Microsoft OS (Win 95/98/ME/NT/2000/XP) and
     even has a real-mode (DOS) version XXCOPY16.EXE with essentially
     the same set of switches (compiled from a common set of source
     files).

5.  XXCOPY provides voluminous documentation with many examples in
     the web site.  The XXCOPY technical bulletin articles are
     10 times the size (> 450,000 characters) of the ROBOCOPY
     documentation (41,000 characters)..

6.  XXCOPY's licensed customers receives competent and prompt tech
     support.

7.  XXCOPY has a
discussion group where users can exchange ideas
     and ask questions.
    


Quick Tips for Robocopy users:

   Since the roots of both ROBOCOPY and XXCOPY are apparently, the same,
   (Microsoft's XCOPY), the two programs have relatively similar feels.
   But, even the small difference is sufficient to confuse the first time
   XXCOPY users who have mostly forgotten how XCOPY worked.  Here's a
   summary of the most confusing aspects.
 
   The way the two programs accept the filename ("lastname") patterns is
   quite different.  The following three command lines are essentially
   the same.
 
      robocopy  c:\mydir     *.doc     *.xls    *.mp3  d:\dest  /s
      xxcopy    c:\mydir\ /in*.doc  /in*.xls /in*.mp3  d:\dest\ /s
      xxcopy    c:\mydir\*.doc      /in*.xls /in*.mp3  d:\dest\ /s
  
   XXCOPY uses the /IN switch to list multiple filename (lastname)
   templates.  But, most often, experienced users who is familiar
   with XCOPY prefer to use a combined "source specifier" when
   there is only one filename template.

      robocopy  c:\mydir *.doc     d:\dest  /s
      xxcopy    c:\mydir\*.doc     d:\dest  /s
       
   The rest of the differences are the name of command switches that
   are mostly a difference in mapping of the switch alphabets.  The
   comparison charts above is a good starting point.  To locate a
   specific XXCOPY command switch,
XXTB #27 is probably the best page.
  

Summing up...

                          ROBOCOPY      XXCOPY
   ----------------------------------------------
    Common features         39           39
    Unique features          5*          38
   ----------------------------------------------
    Total                   44           77

   * Most of the ROBOCOPY features which are unique to ROBOCOPY
     are idiosyncratic, or otherwise, of relatively minor import.
     The only unique feature of any substance is ROBOCOPY's /TIMFIX
     operation which XXCOPY does not support as of this writing
     (September, 2001).
posted on 2007-10-20 16:31 疾风随影 阅读(1212) 评论(0)  编辑 收藏 引用 所属分类: Teaching column
只有注册用户登录后才能发表评论。