Technical Bulletins


XXCOPY Technical Bulletins (Reference)




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

XXCOPY TECHNICAL BULLETIN #01



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: XXCOPY Command Parameters Reference
Date:    2003-05-01  Revised for ver 2.84.2
====================================================================

Basic Command Parameter Syntax:

  XXCOPY   source   destination    (simplified syntax)

  In its simplest form, XXCOPY takes two parameters,

      from WHERE to WHERE

  This very intuitive command syntax has its root in the COPY command
  introduced in 1981 as a PC-DOS (MS-DOS) built-in command.

  The first parameter is the source specifier and the second one is
  the destination specifier.  These two parameters must be in this
  order.  As common to the COPY and XCOPY command syntax, the
  destination specifier can be omitted.  Then, by default, the
  current directory in the current drive becomes the destination.

  XXCOPY   source  [ destination ]

  By convention, an optional parameter is denoted in the syntax
  definition with a pair of square-brackets surrounding it.

  In addition, you may add command switches (which are also called
  options) to customize XXCOPY's behaviors.  It is the extensive
  set of switches that make XXCOPY so versatile and powerful.


Full Command Parameter Syntax:

  XXCOPY   source  [ destination ]  [ switches... ]

  All switches start with a slash (/) character whereas the source
  and the destination specifiers do not have the slash(/) prefix.
  The source and the destination specifiers must be separated from
  other items in the command line by at least one blank (space or tab)
  character.  On the other hand, you may omit blank characters between
  switches in order to minimize the total length of the command line.

  Example:

     XXCOPY  C:\mydir\   D:\yourdir\   /S /H

     Here, "C:\mydir\"  is the source specifier and "D:\yourdir\" is
     the destination specifier.  They do not start with a slash (/).
     It has two (/S and /H) switches.

  Note that the positions of the switches need not be at the end of
  the command line.  Switches may begin even before the source specifier.
  The order of the switches is not generally important except when
  conflicting switches are specified, the rightmost switch will
  prevail.  More rules for special cases are discussed at the end
  of this article.  For a complete syntax and semantics for the
  source specifier, see XXTB #04.

     -------------------------------------------------------------
      Caution to DOS novices:

      The blank characters (space or tab) act as the delimiter of
      the arguments.  Therefore, a name with embedded space must
      be surrounded by a pair of quotes (") to be kept unbroken.
  
         XXCOPY   C:\My Documents\   D:\backup\     // bad
         XXCOPY  "C:\My Documents\"  D:\backup\     // good

      This is true for nearly all command line applications.
     -------------------------------------------------------------

  Once you learn this simple rule, it is quite easy to understand a
  long XXCOPY command line.


XXCOPY switches:

  Here, a first time XXCOPY user may be overwhelmed by the sheer
  number of the switches.  Since the power of XXCOPY comes from
  these switches, you have to learn to live with them.  We try
  our best to keep these (still increasing) switches under control.
  Since the number of switches far exceeds the available alphabet,
  many of the switches use multiple characters.  For better or worse,
  the syntax adheres to the original XCOPY's syntax very closely.
  It is a mixed blessing, for sure.  So, when we feel very strongly,
  we took liberty in making improvements in a few exceptional cases.
  But, overall, if you are very familiar with how XCOPY works, there
  will be very little surprise for you.

  Let us just take a look at the full list of XXCOPY switches with
  a terse comment on each.  For most switches, full explanation will
  be given later.

      for Command Line Syntax                          XXTB #25
      for Command Reference Alphabetic Listing         XXTB #26
      for Command Reference Functional Classification  XXTB #27
      for The Wild-Wild-Source Specifier               XXTB #28


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

        /A0  Cancels *ALL* /A, /M, /AT, and /AX switches.

  -----  The following switches modify 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 archive attribute after XXCOPY is done.
  /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 attribute 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.
      
      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  Overwrites 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 /A).

            (File attributes are discussed in XXTB #06)

  -----  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).
        /BE  Backs up exactly the same files(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).
        /B0  Undo any of /BI, /BB, /BN, /Bo, /BX, or /BZ switches.
         /U  Updates the files that already exist in destination.

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

        /SP  Spans the copy job over multiple destination (new volume).

             Note: /SP cannot be used with switches which reference the
                   destination for file selection --- that is, the /Bxx
                   (backup) switches, and /U will be disabled by /SP.
                   That is, the spanning of the destination volume by /SP
                   assumes the backup operation is a full backup without
                   referencing the files already on the destination.

  -----  The following switch adds inclusive alternate templates -----

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

  -----  The following switches exclude directories or files -----

  /X<xspec>  Adds an exclusion specifier (xspec) (see below for exclusion).
 /EX<xlist>  Specifies a text file which contains a list of xspecs (see below).
     
    <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):

               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.

             See XXTB #05  (The Exclusion specifier).

  -----  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:<date>  Same as /DA:<date>.
 /DA:<date>  Copies files that were changed on or after the specified date.
 /DB:<date>  Copies files that were changed on or before the specified date.
 /Do:<date>  Copies files that were changed on the specified date.
    /DA#<n>  Copies files that were changed on or after  <n> days ago.
    /DB#<n>  Copies files that were changed on or before <n> days ago.
    /Do#<n>  Copies files that were changed on the day   <n> 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#<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.
      
      /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:<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
             2 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:<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).

      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 and /DB, if date is omitted, are the same as /BN and /Bo,
             respectively, except that /DA and /DB can be combined with another
             /Bxx switch (e.g., /BI) where as /BN and /Bo cannot (in the same group).

      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.

        /D0  Cancels all file-date related (/D...) switches.

  -----  The following switches modify filetime semantics -----

        /FW  Uses the Last-Write timestamp for the Filetime comparison (default).
        /FA  Uses the Last-Access timestamp for the Filetime comparison.
        /FC  Uses the Creation timestamp for the Filetime comparison.

             Note: /FW, /FA and /FC are mutually exclusive choices.

        /FL  Filetime in Local time (default).
        /FU  Filetime in UTC(Universal Coordinated Time - same as GMT).

             Note: /FL and /FU are mutually exclusive choices.

      Note:  The word "Filetime" (or sometimes, "Filedate") is used
             in the context of comparing the time value associated
             with a file against another time value (e.g., in /DA, /BN)
             and XXCOPY uses only one of the three timestamps that
             are attached to a file (by the /FW, /FA or /FC switch). 
             
        /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.

        /FT  Legacy switch; replaced by /FF+2.
        /FR  Legacy switch; replaced by /FF-2.

  -----  The following switches cope with time zones -----

    /TS+<n>  Adds an offset (Hr) to the time of source (and the copied ) file.
    /TS-<n>  Subtracts an offset (Hr) from source (and the copied) file.
    /TD+<n>  Adds an offset (Hr) to the time of the destination file.
    /TD-<n>  Subtracts an offset (Hr) from the dst file for comparison.

      Note:  The offset value <n> for /TS and /TD is specified in hours
             unless it is appended with a one-letter suffix (D, H, M, or S
             which stand for Days, Hours, Minutes, or Seconds respectively).

  -----  The following switches control timestamps -----

       /TTA  Touches (modifies) timestamp of Last Access of src.
      /TTA0  Preserves timestamp of Last Access of src (default).

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

  -----  The following switches qualify the source by file size -----

/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 stands for metric kilo
             (x1000), mega (x1000000), or giga (x1000000000) respectively).

     /SZ<n>  Legacy switch; replaced by /TR<n>.

  -----  The following switch limits the destination file size -----

     /TR<n>  Truncates the new file to (copies the first) n bytes.

      Note:  The TR<n> switch replaces the legacy SZ<n> switch.

  -----  The following switches deal with subdirectories -----

         /S  Copies directories and subdirectories except empty ones.
         /E  Copies directories and subdirectories, including empty ones.
             Same as /S /E.
         /T  Creates directory structure, but does not copy files.  It copies
             all directories including empty ones (implicitly sets /E).

        /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...).
        /SL  Flattens subdirectories, add-name-Left   (see below).
        /SX  Flattens subdirectories, add-name-Middle (see below).
        /SR  Flattens subdirectories, add-name-Right  (see below).
             /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.
       /SLR  Rebuilds flattened directory (path to the left).
       /SXR  Rebuilds flattened directory (path in the middle).
       /SRR  Rebuilds flattened directory (path to the right).
             /SLR /SXR, and /SRR do opposite of /SL, /SX and /SR respectively.
      /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 (`).
     /DL<n>  Limits processing of directory nesting to n levels.
             /DL0 removes the limit.  /DL works only when /S or /E is set.

  -----  The following switches check the destination directory -----

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

         /Z  Deletes extra files or subdirectories in destination.
        /ZY  Same as /Z except there is no confirmation prompt.

  -----  The following switches control the prompting behaviors -----

         /P  Prompts you before creating each destination file.
        /PC  Prompts you before creating new files.
       /PC0  Suppresses warning on file-creation.
        /PD  Prompts you before starting each directory with options for...
             Y (Yes), N (No), A (All), R (Remaining dirs), S (This & subdirs).
        /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).
        /PZ  Prompts you for confirmation of the dst (for /CLONE /Z /ZY).

         /W  Same as /WS.
        /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).
        /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).
       /WD0  Suppresses warning for copying a non-directory source.
        /WD  Prompts with a warning for copying a non-directory src (default).
       /WV0  Suppresses warning for an untested OS environment.
        /WV  Prompts with a warning for an untested OS environment (default).

         /C  Continues copying even if errors occur (default).
        /C0  Disables the /C switch (terminates upon error).
        /CB  Continues batch file if XXCOPY ended OK last time.
       /CBQ  Same as /CB except suppresses console output to end immediately.
       /CB0  Cancels the /CB and /CBQ switches.
        /CE  Same as /CBQ/EC (most useful in batch file with @echo off).
     /CR<n>  Sets the retry period (n seconds, default = 3) on failed copy.

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

  -----  The following switches control Remove (file delete) -----

        /RC  Removes files in src after a successful copy (equivalent to move)
        /RS  Removes files in src which qualify (no copying).
        /RD  Removes files in dst which qualify to be overwritten (no copying)
        /RX  Removes files in dst which are absent in src (no copying).
        /R0  Undo any of /RC, /RS, RD, or /RX switches.
       /RCP  Prompts on source-file-remove after successful copy (default).
       /RCY  Suppresses prompts after a successful source-file-remove.

      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.

     /RMDIR  Removes a directory Same as /RS/S/H/R/PD0/ED0.


  -----  The following switches control empty directories -----

       /ED0  Deletes an empty directory (default)
        /ED  Preserves the directory even if it becomes empty.
     /ED<n>  Preserves n levels of empty directories.

      Note:  These switches are in effect only with file/directory removal
             operations (/Z, /RC, /RS, /RD, /RX, and /CLONE cases).

  -----  The following switches control cyclic directory copy -----

       /CC0  Disallows cyclic copy (src includes the dst directory).
        /CC  Warns a cyclic copy with a Y/N prompt.
       /CCY  Allows a cyclic copy by excluding the dst from src (default).

  -----  Filename pattern matching  -----

         /N  Uses the short (8.3) name for name matching, and creation.
        /N0  Disables /N and /NP (default, uses longname when applicable).
        /NP  Uses precise name matching (ignores match in alias).
       /NP0  Uses loose name matching (default, longname or shortname match).
        /NX  Preserves the shortname when the file is copied.
       /NX0  Disables the /NX (shortname preservation) feature.

             Note: /N, /NP, and /N0 are mutually exclusive.

             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.

        /NL  Renames longname to match the source (No copy operations).
        /NS  Renames shortname to match the source (No copy operations).
       /NC0  Disables /NCL, /NCU, or /NCX (accepts letters of both cases).
       /NCU  Uses Uppercase-only name when a new file is created.
       /NCL  Uses Lowercase-only name when a new file is created.
       /NCX  Uses Uppercase-only name when a new short-name file is created.
        /NW  Uses the new (Win32) wildcard matching scheme.
        /ND  Uses the old (DOS) wildcard matching scheme.

             Note: /ND and /NW are mutually exclusive choices.

  -----  The following switches terminate when a quota is met ----

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

  -----  Miscellaneous switches -----

        /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).
 /CF<fname>  Specifies a Command File whose contents are treated as if
             they were entered at the position it appear in the command line.
             The Command File is a text file which may have multple lines.
         //  Starts a comment field.  The rest of the line will be ignored.
         ::  Starts a comment field.  The rest of the line will be ignored.

             (See XXTB #37 for a full coverage of this feature.)

         /1  DATMAN One-pass copy (when copying from DATMAN tape, default).
         /0  Disables DATMAN One-pass copy (not recommended, but allowed).
         /V  Verifies after copy default (same as /V1).
        /V1  Verifies after copy (quick test --- file size match).
        /V2  Verifies after copy byte-by-byte check (DATMAN 2-pass).
        /V0  Disables verify switch (canceling /V, /V1, or /V2).
        /VE  Displays only error cases of DATMAN 2-pass verify (/V2).
        /ER  Emulates XCOPY's exit code (for ERRORLEVEL check in batch files).

     /CLONE  Duplicates a directory (volume).  This switch is a shortcut of
             the following combination: /KS/H/E/R/Q/Y/BI/ZY/ZE/oD0.

        /CK  Checks remaining space before copy (default).
       /CK0  Disables the pre-check of remaining space before copy.

  -----  The following switches control the progress bars -----

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

  -----  The following switches control List output -----

         /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
                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 and L are both missing, L is used by default.

             Note: The format specified by /FM<items> will be used if /L
                   is not followed by its parameter.

     /LTREE  Lists directory tree (without copy or making directories).

             Note: with /LTREE, the /DA/DB/Do parameters apply on dir time.

         /F  Displays full source and destination file names while copying.
 /Fo<fname>  Displays full source and file names and also saves into a file.
       /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
                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 and L are both missing, L is used by default.

             Note: /L/FM<items> can be combined into a /L<items> switch.

  -----  Miscellaneous switches -----

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

  -----  The following switches control Security Information -----

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

  -----  The following switches control file-write cache -----

        /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

        /CL  Legacy switch, replaced by /CA

  -----  The following switches control the console output -----

        /EC  Echoes the entire command line (after macro processing).
        /Q0  Displays all file names.
         /Q  Same as /Q1.  Does not display files which are skipped.
        /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.
        /ZS  Disables the sign-on message and statistics output.

  -----  The following switches control the log output -----

 /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.
        /o0  Cancels the /oN or /oA switch specified earlier.

      The screen and the log file output can be fine tuned by the followng:

     /oP<n>  Parameter (command switch detailed) list.
     /oI<n>  Include item (alternate file template) list. 
     /oX<n>  Exclude item list.
     /oF<n>  File list (files which were successfully operated).
     /oS<n>  Skipped file list (with the reason why skipped).
     /oD<n>  Deleted file list (by a /Z or /ZY switch).
     /oE<n>  Error summary with the system error code

      These items can be controlled by the suffix <n> value, 0-3.

             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.    

     /DEBUG  Shows the command parameters and prompts you to start.
    /DEBUGX  Shows the command parameters and exits.
      /HELP  Shows the switches in detail (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.
         /?  Shows a summary of the switches on one page.
     ... /?  Shows related switches when entered with other switches.

      Note:  All XXCOPY command switches are case-insensitive.
             The alphabet, O, is spelled in lower-case (o) in this page to
             help distinguish it from the numeric zero (0).

      Note:  Virtually all of the switches can be disabled by adding 0 (zero)
             at the end (e.g., /A and /A0).  Due to the space limitation and
             their redundant nature, only some of these cases are listed in
             the help text.

  -----  Pre-defined macros to embed current date and time ----

    /$xxxx$  Pre-defined 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".
/$II-IWK-K$  Expands to the ISO 8601 year-week --> "02-W52-3".

       /TM0  Cancels the time offset set by /TM+ or /TM-.
    /TM+<n>  Adds an offset to the current time of macro reference.
    /TM-<n>  Subtracts an offset 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).

  -----  Environment Variables in XXCOPY command files ----

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

  -----  Installation of XXCOPY ----

   /INSTALL  Installs the XXCOPY software package on your computer.
   /INSTALL:<dir>   Installs XXCOPY at user-specified directory.
 /UNINSTALL  Uninstalls XXCOPY from your computer.
   /LICENSE  Displays the XXCOPY license status on your computer.
     /HOSTS  Displays the names of remote hosts accessed by XXCOPY.

  -----  The following switches are DATMAN specific -----

             DATMAN is a revolutionary tape control software also published
             by Pixelab, Inc.  It makes a tape drive behave almost like a disk.
         /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.
      /G<n>  Sets DATMAN N-Group (redundant) write. (<n> : 0 - 7).
             e.g., /G1 writes the same data twice on DATMAN tape.

  -----  Environment variables that affect XXCOPY-----

    COPYCMD  Specifies file-overwrite prompting.
             /Y  suppresses the prompt (always overwrite)
             /-y prompts you for a Yes/No/All option for a file overwrite
             (This feature is for the COPY/XCOPY compatibility.)
     XXCOPY  Specifies XXCOPY's command argument.  This argument string
             is evaluated first and therefore the user-typed command line
             can override it.  The syntax is the same as regular argument.
    XXCOPYX  Specifies a list of exclusion specifiers (xspec).
             Do not use switch prefix (/X). See the /X switch for details.

        /ZE  Disables the use of all Environment Variables for XXCOPY.
        /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.


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

 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =


Source Specifier:

  XXCOPY's first argument (without regard to command switches) is
  the source specifier.  The source specifier is usually a path
  specifier for the source.  But, for XXCOPY (as well as for XCOPY),
  the source specifier may contain the "Base" directory and an
  optional file pattern specification whose subtleties are not fully
  appreciated by many XXCOPY users.

  The source specifier has three parts:

     [ volume_spec ] [ base_dir ] [ pattern ]

  Example (the destination specifier is omitted here):

     xxcopy    c:\mydir\*.doc
     xxcopy   "c:\program files\mydir\myfile.doc"
     xxcopy    \\myserver\drivec\config.sys

  Here, the three parts in the source specifiers are quite obvious.  In
  the second example, the double-quotes (") make XXCOPY to treat the
  entire command argument as one source specifier.  Without the double-
  quotes, the embedded space character would make it two parameters

    volume_spec

      In most cases, the volume spec is a drive letter followed by a
      colon (e.g., C: ).  But, it can be a universal naming convention
      (UNC) string for a volume in a network (e.g., \\myserver\drivec ).
      If you omit volume_spec, the current drive is assumed.

    base_dir

      The name of the source directory.  When the XXCOPY command
      contains the subdirectory switch (/S and/or /E), the base_dir
      specifier denotes the starting directory where the source
      files and subdirectories are located.  The base_dir part
      must not contain wild card characters.

    pattern

      The last part within the source specifier denotes the pattern
      matching string which may contain wildcard characters (* or ?).
      It matches only the last components within a full filename.

  You may omit any of the three parts, but you may need something
  as the source specifier as the space holder so that you can specify
  the destination specifier as the second non-switch argument.  In
  this case, you may use "." which denotes the current directory
  as the source.

  When you omit either the base_dir part or the pattern part,
  that is, when a source specifier without a backslash separating the
  two parts, the exact meaning of the command become ambiguous.
  We will discuss the source specifier ambiguity in a later
  article.

Destination Specifier:

  The destination specifier has two parts:

     [ volume_spec ] [ dest_dir ]

    volume_spec

      As for the source specifier case, the destination may contain
      a volume specifier (e.g.,  C: ).  If it is omitted, the volume
      of the current directory will be used.

    dest_dir

      The name of the destination directory.  Here, the destination
      must be a directory name (which may or may not yet exist
      in the destination volume).  Unlike the original COPY command,
      you are not allowed to specify wildcard characters in the
      destination specifier which would be conveniently used to
      perform renaming action while copying the files.

      XXCOPY does not rename files while they are copied. therefore,
      no wildcard characters have no place in dest_dir.

  Unlike the source specifier counterpart, the destination specifier
  consists of only two parts both of which are optional.  When you
  omit both of them, then the command line would have no explicit
  argument as the destination specifier.  Don't worry, the current
  directory will be used as the default destination directory.  Or,
  you may just type "." which denotes the current directory explicitly.


Prefix and Delimiters:

  Earlier versions of XXCOPY switch used to accept either a slash (/)
  or a hyphen (-) followed by at least one letter or digit.  That was
  started with the DOS version (XXCOPY16.EXE) which did not have to
  resolve the hyphen character from filename before the long name
  was introduced.   However, due to the fact that the hyphen is now
  a legal character in Win32's long filename, this practice had to
  be abandoned.  It became clear lately that the over all price to
  pay in the twisted syntax rules to support of the Unix-like switch
  prefix has become too high for the now-questionable "benefit".

  Usually, command line parameters are separated by blanks. However,
  you may safely combine switches without separating blanks for the
  command switches (e.g., /s/t/u/v).  However, you must separate
  the source and the destination specifiers by blanks.



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #02



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: What are the differences between XCOPY and XXCOPY?
Date:    2000-11-30 (revised)
====================================================================

Introduction:

  When we designed XXCOPY, one of the key design principles was to
  keep the command syntax and the behavior of XXCOPY as close to
  those of the original XCOPY program.  Although we did not agree
  with all the idiosyncrasies of XCOPY, modifying anything XCOPY
  already implements would cause substantial confusion to the users.
  If we change things arbitrarily, any incremental improvements we
  may add would be more than offset by the burden of remembering
  the specifics of changes we make.  That would not benefit anyone.

  Therefore, the changes we added to XXCOPY on purpose are kept to
  the absolute minimum.  The changes we made are those with
  substantial benefits to the users.

The key arguments, source and destination:

  Like XCOPY's predecessor, the built-in COPY command of COMMAND.COM,
  XXCOPY has two basic arguments without counting any other switches.

    XXCOPY source  [ destination ]

  Here, the semantics of the first argument (source) are almost the
  same as the first argument of the traditional XCOPY command.  It
  is the source file/directory specifier, which is a combination of
  the source directory and optional filename pattern specifier.
  To be precise, this combination of directory specification with
  the filename pattern connected by a backslash does not conform
  to a regular so-called pathname specifications. (We will discuss
  the exact definition of the source specifier in another Technical
  Bulletin article in full detail.)  Just remember that the source
  specifier is pretty much the same as that of XCOPY.

  The destination specifier is optional as in the case of the
  original XCOPY and COPY commands.  When the destination is not
  specified, XXCOPY uses the current directory as the destination
  direction.


Destination specifier (Difference #1):

  In XXCOPY, the destination specifier (when supplied by the user)
  refers to the name of a directory whether it exists or to be
  created by the command.  In any event, the destination never
  specifies any particular filename.  It always specifies the name
  of the destination DIRECTORY.

  The reason for this change was the confusing and bothersome
  behavior of XCOPY.  For one thing, when you specify a non-exist
  directory as the destination of XCOPY, you would be greeted by
  the familiar prompt:

      Does XXXX specify a filename
      or directory name on the target
      (F = file, D = directory)?

  In nearly all cases, you would type D and sigh a long DUHHHHHHH!!!!
  Yet, because XCOPY allows the action to include renaming the file
  while it is being copied, this ambiguity arises.  It is simply
  carrying on the legacy of the COPY command.  While the copy command's
  simplistic "rename-while-you-copy" features using a wildcard
  specifier works, we consider the action quite dangerous.
  When you use a wildcard with "rename-while-copy" feature which
  involves a large number of files, you may accidentally create a
  filename collision, which would abort the "rename-while-copy" action
  in the middle.  The result would be a big mess of partially
  renamed files.

  We consider the "rename-while-copy" a source of much trouble and
  therefore, we discourage your using it.  After all, XXCOPY is not
  designed to handle one or two files.  You can always use the simple
  COPY command to do just that.  Therefore, in our opinion, eliminating
  the double meaning of the destination specifier from XXCOPY's second
  argument, we can avoid the side-effects of the "rename-while-copy"
  operation altogether and also eliminate the bothersome prompt of
  "Do you mean F = File, or D = Directory".  Also, we are sure that
  everybody has experienced the huge file which is accidentally
  created by a simple COPY command with a directory as the source
  and a non-existent directory as the destination.  The copy command
  interprets the destination as a filename rather than a directory and
  accumulates all the source files combined into a huge pile of useless
  bytes.)  Anyway, we had enough confusion with the double meaning
  of the destination specifier.  XXCOPY dares to correct this problem.

  With XXCOPY, the destination is always a directory, never a file.


XXCOPY.EXE and XXCOPY16.EXE (Difference #2):

  In the case of XCOPY, it automatically switches between XCOPY.EXE
  (a 16-bit program) and XCOPY32.EXE depending on the environment.
  In fact it is quite convenient for most users to forget about
  the distinction between XCOPY and XCOPY32.  Some users may not
  even know the existence of XCOPY32.EXE.  The actual mechanism is
  that when you run XCOPY.EXE in the Win32 environment, XCOPY.EXE
  automatically detects the current environment and will execute
  XCOPY32.EXE instead.  We also consider this feature quite dangerous.
  That is because the behaviors of XCOPY and XCOPY32 are not identical.
  For example, the treatments of a pathspec with wildcard characters
  in the DOS and Win32 environments are significantly different.
  Therefore, any large-scale batch file invocation should distinguish
  the usage of XCOPY and XCOPY32 to be safe.

  Due to that consideration, we feel the danger of having unintended
  COPY operations performed in the different machine environments
  outweighs the convenience of the automatic invocation of the 32-bit
  version.  Therefore, XXCOPY (which is the 32-bit version) will NOT
  automatically invoke the 16-bit counterpart.  You must select the
  appropriate version when you need the distinction.  Since the
  16-bit version, XXCOPY16.EXE, is seldom used, we chose the scheme
  where the shorter name is for the 32-bit version.  Also, in a
  32-bit environment, XXCOPY does not have the overhead of XCOPY,
  which always loads and runs XCOPY.EXE before XCOPY32.EXE, 
  unless you specify XXCOPY32 in the first place.

  XXCOPY is always in 32-bit and XXCOPY16 is always in 16-bit.


The /C switch as the default (Difference #3):

  XCOPY32 added the much needed switch, "/C" which allows an
  automatic continuation of the copy operations after encountering
  an error condition.  The C stands for "Continue on error".

  Before Microsoft introduced Windows 95, and therefore, the new
  XCOPY32.EXE utility, DATMAN-DOS users demanded a solution to
  the "share-violation" problem in a backup job of NetWare server.
  Even within a modest sized network, there are always a few files
  which are open at the time of a server backup job.  When XCOPY
  tries to open a file which is already opened by another process,
  the access results in  the error condition where the user had
  only three choices:  Abort, Retry, or Fail.

  None of these choices would let XCOPY continue the operation.
  As a matter of fact, XXCOPY's predecessor (DCOPY.EXE) was born
  to correct this problem even in the DOS-only days.  The first
  enhancement to the XCOPY command was the /C switch.  Now, with
  XCOPY32, which supplies the much-needed switch, the problem was
  pretty much behind us.

  We had XXCOPY's /C switch work exactly the way XCOPY32's /C
  switch works.  When it was specified, an error condition that
  would have aborted the entire copy operations will continue
  until all the qualified files are copied.  Alas, the most
  frequent technical support issue with the earlier versions
  of XXCOPY was due to the omission of the /C switch.  After
  answering many tech support Emails, we have reached the
  conclusion that Microsoft should have made the /C switch its
  default mode with a provision to disable it.

  For this reason, we broke our rule of adhering to XCOPY32's
  behavior exactly, for better or worse.  Here, we made XXCOPY's
  implementation of the /C switch the exact opposite of how XCOPY32
  handles the case.  We believe it is in the best interest of the
  users.  As of this writing, Microsoft's 16-bit counterpart,
  XCOPY does not have the /C switch.

  With XXCOPY (also with XXCOPY16), the /C switch is automatically
  invoked by default.  You need to specify /C0 to disable this
  feature and to allow XXCOPY to terminate at the first instance
  of an error condition.


The /T switch always enables /E (Difference #4):

  Since the /T switch is to construct the directory tree (without
  the files), it makes no sense to run it without /S or /E (which
  handles subdirectories).  We consider the /T/S combination
  quite useless and hence chose to always include the E switch
  implicitly.  We believe the /T switch is now trouble free.


The use of quotatoin marks in a command line (Difference #5):

  When a pathname contains an embedded space, the whole string
  must be surrounded by a pair of quotation marks (").

  Microsoft's XCOPY allows a very liberal usage of quotation
  marks to an extent it even accepts bizarre strings.  For
  example, XCOPY allows the following strings without problem:
  
     "c:\Program Files\My Directory\Myfile.doc"     // OK
     "c:\Progra""m Files\My Directory\Myfile.doc"   // two pairs
     c:\Program" Files\My "Directory\myfile.doc     // bizarre

  We feel XXCOPY should not allow such questionable constructs
  even though they are accepted by XCOPY.  While it is not
  impossible for us to make XXCOPY imitate the behavior closely,
  we would have hard time defining and explaining the exact
  syntactic rules.  So, we chose to deviate from XCOPY's rules.
  
  XXCOPY's rule for the quotation mark is very simple:

    The quotation marks must be at the both ends of a pathname.


Other differences:

  In almost all other cases, the differences between Microsoft's
  XCOPY and our XXCOPY are a result of enhancements rather than
  alteration of the XCOPY behavior which already existed.

  With the few notable exceptions discussed in this article, the
  differences between XCOPY and XXCOPY are remarkably small.
  For example, XXCOPY pays attention to the short name alias
  which preserves the short name after the copy (TB#02).  But,
  this is a pure "improvement" rather than "change" which does
  not require user attention or precaution.

  Therefore, you need not worry much about how to use XXCOPY
  if you already know XCOPY.  You can pick just a few new
  features when you want to learn XXCOPY.  Over time, you may
  come to like XXCOPY and exploit its unique features to write
  your own very powerful batch script for a backup operation.


XXCOPY's major enhancements:

  0. Wild-src  Wild-Wild-Source, multi-level, multi-wildcard source
  1. /X        exclusion specifier and related switches (/EX)
  2. /IN       inclusion specifier for alternate file pattern template
  3. /Bx       variations in backup related switches
  4. /NX       retains the short name exactly
  5. /NS /NL   renaming short name and long name based on the other
  6. /D        date matching with many variations
  7. /Rx /Z    removes files using the versatile file selection schemes
  8. /SG/SX    gathering files or flattening a directory tree
  9. /SZ:      select file by the file size (range)
 10. /CC /CCY  cyclic copy cases handled with the exclusion method.


  If you have a suggestion for a new XXCOPY feature, tell us about
  it.  We will consider any user feedback very seriously.
  Please send E-Mail to <tech@xxcopy.com> for comments, suggestions,
  questions, etc.



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #03



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: Problems in filename aliases (8.3 names) in Win32
Date:    1999-11-27
====================================================================

Background:

  When Microsoft implemented the long filename in Windows 95,
  it came up with a scheme which assigns an alias (or short name in
  the so-called 8.3 format) for every long name.  Typically, a short
  name starts with the first 6 letters in the long name followed by
  a tilde and a digit, (numeric tail like XXXXXX~1.XXX), discarding
  remaining characters except the three-letter extension.  The short
  name is synthesized by the file system driver for the volume, in
  such a way that all filenames become unique one another within
  a given directory.  The rule to assign the numeric tail is very
  simple; it picks the smallest decimal value not yet claimed in the
  directory.

  As long as the aliases are used by legacy programs to access files,
  the actual filename assigned to a file should not be very important.
  But the truth is that even Windows 95 itself accesses certain files
  using their short name aliases.  One notable situation is when the
  most primitive virtual drivers (VxD) are loaded at the beginning
  of Windows 95 system start up sequence.  Since the long name support
  is provided by a module called IFSMgr (InstallableFileSystem Manager)
  which is itself a VxD module, locating and accessing the VxD files
  are all performed strictly using the short name alias.  If you
  examine various parts of the system registry, you will find many
  8.3 name strings.  In short, the system relies on the 8.3 naming
  scheme in a very crucial manner.


The problem:

  The problem arises when a directory contains a number of files
  whose aliases share a common base part (differing only by the numeric
  tails).  When you copy these files to another directory, the
  aliases will be assigned by the simple (first-come-first-served)
  algorithm, the first such file copied to the destination directory
  will have numeric tail of ~1 regardless of what was its alias
  in the source directory.  Therefore, the Windows operating system
  does *NOT* preserve the alias after copying.  We consider this a
  very serious defect in the file system design.  Most file copy
  programs ignore this aspect in file copying.  This includes
  Explorer (drag-and-drop), COPY, and XCOPY.


Example:

  Here, we make a simple sequence in a DOS Box to illustrate the point.
  It is assumed that you have the \autoexec.bat file handy (can be any
  file).  Let us create a pair of files with names that would have the
  same short name base for the alias.

     C:\> mkdir \src
     C:\> copy  \autoexec.bat  \src\LongNameA.bat
     C:\> copy  \autoexec.bat  \src\LongNameB.bat
     C:\> dir   \src

     LONGNA~1.BAT       1234       11-21-99 11:27p LongNameA.bat
     LONGNA~2.BAT       1234       11-21-99 11:27p LongNameB.bat

  Use the traditional method to copy the files.  When you use another
  method like Drag-and-Drop, you would get the same result.  First,
  pick the file whose short name numeric tail does not end with ~1.

     C:\> mkdir \dst
     C:\> copy  \src\LongNameB.bat  \dst
     C:\> copy  \src\LongNameA.bat  \dst
     C:\> dir   \dst

     LONGNA~1.BAT       1234       11-21-99 11:27p LongNameB.bat
     LONGNA~2.BAT       1234       11-21-99 11:27p LongNameA.bat

   Here, the first file created in the destination received the numeric
   tail of ~1, even though its alias in the source was not that.
   If you don't see the difference in the left hand side (the aliases),
   see the long names to your right (---B and ---A are opposite).


Enter XXCOPY:

   Now, try the same operation using XXCOPY in the \new directory.

     C:\> mkdir  \new
     C:\> xxcopy \src\LongnameB.bat  \new
     C:\> xxcopy \src\LongnameA.bat  \new
     C:\> dir    \new

     LONGNA~2.BAT       1234       11-21-99 11:27p LongNameB.bat
     LONGNA~1.BAT       1234       11-21-99 11:27p LongNameA.bat

   Here, the files in the \src directory and in the \new directory
   match exactly (both the long names and the aliases) albeit the
   new order reflects the order of copying.


Other cases:

   The above example is just one of the many problems with aliases.
   For example, when you delete the file with the numeric tail of
   ---~1 in the source directory and copy the files; the first
   files copied to the destination will be assigned with an alias
   ending with ---~1.  In essence, the short name alias is
   systematically synthesized by Windows kernel without regard to
   what the original alias in the source directory was.  This kind
   of discrepancies in file and directory names lead to subtle but
   serious problems which are often very difficult to even diagnose.


How safe is XXCOPY?

   XXCOPY performs the alias name change using only published
   standard Win32 file I/O API.  XXCOPY does not attempt to
   manipulate the raw directory data structure of the file system.
   Nor does XXCOPY perform any unorthodox techniques to implement
   the alias matching feature.  The operation utilizes a combination
   of simple file-renaming system calls.  Therefore, it is completely
   safe.

   On the other hand, when the destination directory already has
   a file with the needed alias (i.e., a case of alias name
   collision), XXCOPY does not perform such an operation which
   would otherwise create an invalid directory data.  Of course,
   the same name for more than one file is No No in a file system.

   Since XXCOPY supports remote machines over a network, the alias
   (8.3 name) support function also works across network.


Win95/98 and WinNT/2000/XP:

   If your use a dual-boot system (Win95/98 and WinNT/2000/XP), there
   is one more pitfall which is related to the shortname.
   Please read our new article, XXTB #08.



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #04



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: What is and what is not included for copy
Date:    2001-01-18
====================================================================

[ Note:  this article is about XXCOPY's file selection mechanism
         in general, not about the recently added /IN switch that
         "includes" alternate filename pattern ]


The problem of being "Too Powerful"...

  With the huge set of command switches offered by XXCOPY, even
  a serious user starts to wonder if a particular file is included
  in the XXCOPY operation or not.  Indeed, there are a number of
  switches which sound very similar and become quite confusing
  which of the switches has "precedence" over the other.  Yet,
  there is hardly any mention of precedence in the XXCOPY help
  and documentation.  This article will give you a simple rule
  which resolves all such questions and gives you the confidence you
  need when you use XXCOPY in your day-to-day computing.


Combining switches:

  Some XXCOPY switches suggest an inclusion of files with certain
  characteristics.  For example,

     XXCOPY  C:\mydir\   D:\newdir\   /H

  It is understood by many XXCOPY users that with the /H switch,
  hidden and system files (which would normally be excluded) will
  be "included" in the copy operation.  Let us add another switch.

     XXCOPY  C:\mydir\   D:\newdir\   /H /U

  The /U switch is used to "update" existing files in the destination
  directory.  In this case (/H/U), hidden files will be included in the
  operation by the /H switch,  but the files which are not already
  present in the destination will be excluded by the /U switch.  Then,
  what about the files which are hidden (to be included) but are
  not present in destination (to be excluded)?  The question seems to
  be whether /H or /U has the precedence.  Let's add some more.

     XXCOPY  C:\mydir\   D:\newdir\   /H /U /BI

  /BI stands for "Incremental Backup" meaning that it will select
  files which are different (by comparing the file date and file
  size between the files of the same name in the source and the
  destination).  The /BI switch includes those files which exists
  in the source but not in the destination.  But, if you combine the
  three, /H/U/BI, then the /U switch (which excludes new files to the
  destination) and the /BI switch (which includes new files) seem to
  contradict each other while the effect of /H seems fine.

  Does the order of these switch makes the difference?  The answer is
  No.  At least that is not the case because /U and /BI are not in a
  mutually exclusive set of switches.  But, clearly, these two switches
  seems to have opposing effects on the files which do not exist in the
  destination directory.  What is the precedence?  What is going on?


The golden rule:

  XXCOPY's switches are all exclusionary.

  Well, it has some element of over-simplification, but it is the
  shortest rule that you can remember.  Each XXCOPY switch excludes
  certain group of files by some measure.  By adding another switch,
  some more files are excluded.   Obviously, there are many
  switches in XXCOPY which do not participate in the file selection
  process.  For example, the /W switch is to let XXCOPY wait for a
  keyboard input before the copy action really begins.  It has
  nothing to do with qualifying files for inclusion or exclusion.
  But, for all the command switches which determine whether a
  file is to be copied or not, the above golden rule applies.


The exclusion process:

  If you consider that all of XXCOPY file-selection switches are
  exclusionary parameters, everything will start making sense.
  And you will realize that the precedence of switches becomes a moot
  point.  You may need to view some of the switches from a different
  angle.  Here, we need some rephrasing of the nature of the switches.

     XXCOPY  C:\mydir\    D:\newdir\  /H

  Earlier, we said /H was to include hidden/system files.  Now, let
  us rephrase it by saying "/H does not exclude hidden/system files".
  Yes, it is still awkward.  But, remember this is a case where the
  default switch in the same category (/H0) did the exclusion and
  you are simply negating it.  Let us revisit the implied case;

     XXCOPY  C:\mydir\    D:\newdir\
     XXCOPY  C:\mydir\    D:\newdir\  /H0

  These two lines produce exactly the same result.  Since it is a
  default, most XXCOPY users do not add such a switch.  These lines
  should read that "the /H0 switch excludes hidden/system files from
  the copy operation".

  Once more,

     XXCOPY  C:\mydir\    D:\newdir\  /H

  We now know that the /H switch simply negates the default exclusion.
  The wording, "/H does not exclude hidden/system files" sounds OK, now.

     XXCOPY  C:\mydir\    D:\newdir\  /H /U

  Adding the /U switch, it becomes "/H does not exclude hidden/system
  files" but "/U excludes files that are not present in the destination
  directory".  Here, the exclusion rule of /U goes by the face value.

     XXCOPY  C:\mydir\    D:\newdir\   /H /U /BI

  Again, we have the /BI (incremental backup) switch which reads as
  "/BI excludes files that exist in destination with identical time
  and size".  This does not contradict with the /U switch which
  "excludes files that are not present in the destination".  All of
  the excluded files will be excluded.  That's simple.


Exclusion by the name:

  Of course, by far, the most obvious parameter to be used in the
  exclusion process is by the directory and filename.  Because it
  gives us a very wide range of opportunities to exploit in
  expressing what to exclude, we did put a lot of thoughts in the
  design of this (probably the single most significant enhancement)
  feature.  Therefore, the /X switch deserves its own treatment
  in a separate article, XXTB #05.

  It is indeed a very natural way of excluding a group of files.
  Now, to come to think of it, we wonder why we have not seen
  similar features in most other file copy utilities...


Conclusion:

  In essence, each command switch has its own way of specifying the
  files to exclude.  Each and every switch adds more exclusions.
  Determining whether a file is excluded from the copy operation is
  now easy.  Once a file is excluded by a switch, it is out and gone.
  Therefore, the more switches you add, the more files you are going
  to exclude from the copy operation.

  As we add more and more switches, it has become increasingly
  difficult for even experienced users to remember all the switches
  (it's now over 120 variations and still growing).  So, we added
  a new feature called "Smart-Help".  Just add "/?" at the end
  (or anywhere) in your XXCOPY command line.  It will select only
  the switches you specified in the line, their related switches and
  its opposing and mutually-exclusive switches as a group.  We find
  this new feature quite convenient.  You should definitely try it.

    Example:    XXCOPY c:\mydir d:\yourdir  /I /BI /FT /?

  To further assist the user in constructing the right combination
  of the command switches, XXCOPY now a set of useful switches
  which list pertinent command parameters.

    /OP       outputs parameter list (in exclusionary wording)
    /OX       outputs exclusion list (after optimization)
    /DEBUG    displays source and destination and prompts before continue
    /DEBUGX   displays source and destination and terminates
    /W        waits for user keyboard input after /OP and /OX switch

  Many users find the output text generated by the /OP switch more
  understandable than any other documentation of XXCOPY.  So, if you
  have any doubt on the effect of switches, just add "/OP | MORE"
  at the end of the command line.  So, to review the whole thing,
  a good alternative to the "/?" trick is "/OP/W".

    Example:    XXCOPY  c:\mydir d:\yourdir  /I /BI /FT /OP /W



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #05



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: The Exclusion specifier in XXCOPY
Date:    2004-09-09  (revised)
====================================================================

Much of the mostly hidden power of XXCOPY lies in the exclusion
mechanism.  We identified the /X switch to be one of the most
important enhancements we made in XXCOPY.  Because it is a
complex scheme with many implied rules, one cannot effectively
use the full potential of the exclusion feature without a detailed
explanation of the full scope of the syntax as well as the way
the exclusion scheme is implemented.  This article will discuss
all the rules applied to the exclusion feature.


XXCOPY Exclusion switch syntax

  /X<xspec>       excludes the file or directory item given by
                  <xspec> which is an exclusion specifier.
                  If the specifier contains an embedded space,
                  the specifier must be surrounded by a pair
                  of double-quotes (").

  /EX<xfile>      specifies a text file whose name is <xfile>
                  which contains a list of <xspec> separated by space.

     (See XXTB #37 for syntactic rules of the file format.)

  /ZX             ignores the environment variable, "XXCOPYX".

  XXCOPYX         The environment variable XXCOPYX specifies a
  (env var)       list of <xspec> which are separated by a space.

  XXCOPY          The environment variable XXCOPY  specifies a
  (env var)       list of XXCOPY switches which may be /X<xspec>.

  Note that the difference between the two environment variables,
  XXCOPY and XXCOPYX is that every item in the XXCOPY value
  must be prefixed with a slash (/) followed by an XXCOPY switch
  (which can be for any XXCOPY switch) whereas XXCOPYX values are
  strictly for the /X switch as a list of exclusion specifiers in
  order to save space.

  You may specify as many exclusion specifiers as you like.


Some examples of the /X switches

  /Xc:\mydir\myfile.txt   // specifies just a single file
  /X*.tmp                 // all files that end with ".tmp"
  /Xabc*                  // all files that start with "abc"
  /Xmydir\                // the entire directory, "mydir" in the source
  /Xmydir\*\*             // same as /Xmydir\ which is a shortcut
  /Xmydir\*\*.tmp         // inside mydir, all files matching "*.tmp"
  /Xmy*xyz\*\abc*.c       // inside mydir, all files matching "abc*.c"
  /X*\cache\              // multiple-level subdirectories
  /X*\cache\*\*           // same as above with a trailing backslash
  /X*\cach?\*\*           // multiple-level subdir spec may have wildcards

  Here, you may see the glimpse of the powerful syntax in the exclusion
  specifier.  The first example seems the most straight forward.  The
  fourth example which ends with a backslash is a shorthand of for the
  common case of excluding a directory (it abbreviates "*\*" which follows).
  Therefore, all of the above examples except the first one contain
  or imply at least one wildcard specifier.  The last example includes
  one asterisks in each of the three parts.

  Don't worry about the complexity yet.  At least the first example shows
  a case which you can use it immediately without any further reading.
  Yes, if you have energy to list all of the files you want to exclude,
  you may painstakingly list all of such files by giving the full
  file specification of each file.  Since you will soon run out of the
  command line space, you will probably want to set up a text file using
  the /EX switch.


  E.g.,  /EXmyexcl.lst

   and myexcl.lst  contains the following specifiers:

     :: this is a comment line
     c:\win386.swp               :: comment may start like this
     c:\autoexec.bat  myfile.tmp :: one line may have multiple items
     "c:\program files"          :: use quotes (") for embedded space
     mydir\myfile.txt            :: pathspec relative to the source dir
     yourdir\                    :: entire yourdir\*\*


     Syntax rule for the Exclusion List File.

         An "Exclusion List File" specified in the /EX switch is a plain
         text file which contains a list of exclusion specifiers.
         You may list as many exclusion specifiers in one line.
         Exclusion specifiers are separated by one or more blank, tab,
         and/or newline character.  An exclusion specifier cannot be
         broken into two or more lines.  When a space character is
         embedded, the exclusion specifier must be surrounded by a
         pair of double-quotes (").  A line may contain a comment field
         which will be ignored by XXCOPY.  A comment field starts with
         two consecutive colons (::) and ends at the end of the line.
         We suggest the use of a line for each exclusion specifier which
         is followed by a comment.


Definition of the exclusion specifier.

    Up to now, the exact meaning of the exclusion specifier has not
    been defined.  Now, we are going to analyze the syntax and its
    meaning to its death.  (Note: the exclusion specifier has been
    revised on 2000-10-09 with the addition of the multiple-level
    subdirectory exclusion feature).

    The exclusion specifier has up to three parts.

        [ dir_spec\ ] [ *\ ]  [ template ]

        Although any of the three parts can be omitted, you must not skip
        both dir_spec and template at the same time.  Note that the last
        part (template) can be either a file-template or a directory-
        template which will be explained below with more details.


     Directory specifier ( dir_spec )

        The dir_spec part specifies the base directory of the exclusion.
        It is always followed by a backslash (\) character.
        The directory can be specified in an absolute path (starting with
        the root directory), or a relative path (without a leading
        backslash) which is treated as relative to the source directory
        (not the "current" directory).

        The dir_spec may contain a wildcard specification in its
        last part. For example

           /Xc:\mydir\level1\abc*\*\template
           /Xc:\mydir\level1\a*bc*.?oc\*\template

        In both of the examples here, the last part of the directory
        specifier (after \level1\) has asterisk(s) in it.  The second
        example goes one step farther by allowing multiple asterisks
        and even a question mark which is another wildcard for a single
        letter.

    The middle part (*\)

        It denotes that the exclusion specification will be applied
        not only to the dir_spec directory, but also to all of the
        subdirectories underneath.  It is equivalent of the familiar
        /S switch which is applied to modify the source specifier
        meaning that the XXCOPY action will include all subdirectories.
        Since we do not have the luxury of a separate /S switch on each
        exclusion items, we invented this notation which figuratively
        suggests the fact that the directory starts with dir_spec,
        ends with the template and anything in between is accepted.

        The following two examples highlight the effect of the middle part.

          /Xmydir\myfile.*      // myfile in mydir\ only
          /Xmydir\*\myfile.*c   // myfile in every directories under mydir\

     Template specifier ( template )

        The last part of the exclusion specifier is the template which
        may be either a file-template or a directory-template.  So, the
        exclusion specifier can be more precisely described by using the
        following two notations:

        [ dir_spec\ ] [ *\ ]  [ filetemplate ]
        [ dir_spec\ ] [ *\ ]  [ dirtemplate ]

        Here, the syntactic distinction of the two types is made by
        the ending of the template string.


    The scope of the exclusion specifier:

        The exclusion operation applies strictly on the objects
        (files and directories) in the source directory, *NOT*
        in the destination directory.  If an exclusion item that is
        not in the source directory, it will be discarded (not
        treated as an error).


Common shortcut notations of the exclusion specifier.

     File template

        When a lone template is specified without a trailing backslash,
        (e.g., /Xmyfile.txt ), it is treated as a shortcut for a
        multiple-level filename template which is equivalent to
        /X*\myfile.txt).  This is mostly for historic reason,
        (also, the frequency of this type of usage justifies it).

        If you need to specify a one-level filename template, you
        should place the dot directory (denoting the current directory)
        to distinguish it from the multiple-level case ( /X.\myfile.txt ).

        Examples:

          /Xtemplate      // file which matches the template inside
                          // the current (src) directory (Multil-Level).
          /X*\template    // the template applies to all subdirectories
                          // this is same as above (Multi-Level)
          /X.\template    // the dot denotes relative to the base (src)
                          // directory (1-Level)

     Directory template

        The directory template may have the following four variations
        in the ending.

           dirtemplate\         // full directory
           dirtemplate\*\*      // same thing with alternate notation
           dirtemplate\*        // file in the directory (one-level)
           dirtemplate\?\*      // all subdirectories but not
                                // the first-level files

           The first two notations are interchangeable and denote
           the whole directory.  And the third and fourth cases are
           partial directory notations (when the two are combined,
           it will match the whole directory.


     Examples:

        /Xdirtmpl\*\*      // excludes all matching directories in the
                           // base (src) directory and its contents
        /Xdirtmpl\         // same as above (the triling backslash
                           // denotes everything inside the directory)
        /X.\dirtmpl\       // in the case of the directory template,
                           // it applies to one directory relative to
                           // the base (src) directory (1-Level)
        /x*\dirtmp\        // you may make a directory template apply
                           // to many instances (Multi-Level)


        /xc:\windows\*     // specifies all the files in the first
                           // level of the c:\Windows directory such
                           // as, EXPLORER.EXE, WIN.INI, COMMAND.COM

        /xc:\windows\?\*   // this does not includes the first level
                           // files but all subdirectories in it such
                           // as \WINDOWS\SYSTEM\  \WINDOWS\DESKTOP\ etc.


        Since both dir_spec and dirtemplate may contain wildcards,
        it could be as complex as...

        /Xc:\mydir\pat*ern\*\dir???\*\*

        This one excludes all subdirectories which starts by "dir"
        followed by three characters which appear in any level of
        subdirectory under any directory inside c:\bydir whose
        name match "pat*ern".

     Note that the following two are distinct:

         /Xdir_spec\*     // one layer only (subdirectories not excluded)
         /Xdir_spec\*\*   // the entire dir_spec directory is excluded

         XXCOPY allows you to exclude either the entire subdirectory
         (which affects both files and directories of any level), or
         one directory layer (which affects only files in the immediate
         level but not subdirectories).


The variations in exclusion specifiers (11 cases)

    The exclusion specifier may be classified into the following
    eleven classes (A - K).

     simple cases     1-Level templates        Multi-Level templates
   -------------------------------------------------------------------
                    D dir_spec\filetmpl      H dir_spec\*\filetmpl
    A dir_spec\*    E dir_spec\dir_tmpl\*    I dir_spec\*\dir_tmpl\*
    B dir_spec\?\*  F dir_spec\dir_tmpl\?\*  J dir_spec\*\dir_tmpl\?\*
    C dir_spec\*\*  G dir_spec\dir_tmpl\*\*  K dir_spec\*\dir_tmpl\*\*

      Note that a dir_spec may be specified with wildcard characters
      in the last component level.  For example,

        c:\mydir\Level2\last?level\*              // simple case
        c:\mydir\Level2\last?level\template\      // 1-level case
        c:\mydir\Level2\last?level\*\template\    // multi-level

      Also, the file_template or directory_template may contain
      wildcard characters.

        c:\mydir\L2\last?level\file?template        // simple filepattern
        c:\mydir\L2\last?level\dir?template\        // whole directory
        c:\mydir\L2\last?level\*\dir?template\*     // 1-level files
        c:\mydir\L2\last?level\*\dir?template\?\*   // Multi-level case

        Here, to illustrate the wildcard in the respective compoents,
        a questionmark(?) was added where a wildcard is permitted
        (last?level\,  file?template or dir?template).

      Note that whereas the dir_spec shown above may consists of many
      levels of directories, the template specifiers (dir_tmpl) in
      Groups I, J and, K must be a single-level directory template
      (without a backslash inside).


The optimization of exclusion matching.

    In a very large scale backup operation, an XXCOPY job may encompass
    an entire volume as the source directory (such as c:\*).  To make
    the matters worse, the more files the source directory contains,
    the more the need for the exclusion specifiers grows.  Therefore,
    it is entirely possible that the entire C: drive may contain
    70,000 files and the total number of exclusion items the user specify
    in the exclusion list file with the /EX switch may contain literally
    hundreds of various exclusion specifiers.  If we were to test every
    file against this very large number of exclusion list, the combination
    will easily reach tens of millions which would slow down the entire
    backup process.  Therefore, XXCOPY performs preprocessing steps
    to analyze the set of exclusion specifiers.  First by classifying
    them into the five classes, some redundant exclusion specifiers can
    be removed.  For example, if a dir_spec is specified in Class B,
    any subdirectories of the same directory in Classes C, D, E, or F
    regardless of the template will be automatically excluded because
    the same directory in Class B spec overshadow any subset of the
    directory.  Moreover, in the actual XXCOPY implementation, the
    the active file pattern matching templates is computed to each
    subdirectory to reduce the number of filename matching to
    eliminate a significant number of redundant combinations.


Debug feature

    Because of the complexities of the exclusion parameters when the
    number of exclusion specifiers become substantially large,  you may
    analyze the list of exclusion parameters immediately after the
    initial exclusion parameter optimization steps are completed by the
    following two debug switches:

      /DEBUG    // displays the parameters and prompt for continuation
      /DEBUGX   // displays the parameters and exit XXCOPY.
      /OX       // outputs the exclusion parameters in the log file
      /OP       // outputs the regular parameters in the log file.

      /OX/W     // a convenient switch to test the exclusion settings


Automatically excluded files.

    Since the few output files (e.g., the error log files) which are
    generated by the XXCOPY program itself could not be successfully
    included in the current copying job if any of them happens to be
    in the source directory (or its subdirectories), those files will
    be always excluded implicitly.



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #06



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: File Attributes: what are they and how to use them.
Date:    2000-01-17
====================================================================

Since XXCOPY has features which interact with the file attributes,
a discussion of XXCOPY cannot be complete without touching the basics
of the file attributes.  This article presents the fundamentals of
the file attributes and how XXCOPY manipulates them.  In addition,
some common techniques with the file attributes are discussed.


What are the file attributes?

  The operating systems (DOS, Win95/98, WinNT/2000/XP) maintain certain
  properties associated with every file and directories in addition to
  the file contents (data inside the file).  Such properties include

    file size in bytes
    file date/time (creation time, last-modify time, last-access time)
    file attributes
          archive bit   (shows that the file has not been archived yet)
          read-only bit (write-protect the file)
          directory bit (distinguishes a directory from a file)
          hidden bit    (hides from an ordinary directory listing)
          system bit    (denotes a system file whatever that means)

    These properties are mostly maintained by various components of
    the operating system and they are handled automatically.  So,
    the users may not be concerned with them.  However,  manipulating
    some of the properties are not very difficult and it can even be
    quite useful at times.  This article shows some common techniques
    associated with the file attributes.

    The file size is always determined by the actual size of the file
    and the only way to change it is to increase by appending more
    bytes to the existing file, or to decrease by overwriting with a
    shorter file.  The file date/time can be more easily changed.
    Since changing any of the three date/time values is supported by
    Win32 file I/O API, one can write a program to change them.  In fact,
    there are many utility programs available to do so.  Here, we will
    discuss the file attributes with greater details.


What is the file attributes?

    Although one can say the file size and the file date/time are file
    attributes (i.e., any properties associated with a file other than
    the file contents), with the more narrow definition and popular
    usage, the file attributes are collection of flags stored as a bit
    mapped 32-bit quantity which describes various aspects of the file.
    The original MS-DOS file attributes had only 8 bits in the file
    attributes, the Win32 file attributes are stored as a 32-bit quantity.

    Although the exact bit positions of the file attributes are not
    officially guaranteed to remain the same by Microsoft, they will
    probably never be changed.

       Bit 0     Read-Only
       Bit 1     Hidden
       Bit 2     System
       Bit 3     Volume Label
       Bit 4     Directory
       Bit 5     Archive

    Bit 3 (Volume Label) was used in MS-DOS to store the volume label
    just like an ordinary file in the directory.  Bit 4 (Directory)
    distinguish a file from a directory.  These two bits cannot be
    modified easily.  But, the remaining four bits (bit 0, 1, 2, and 5)
    can be examined and/or modified by the ATTRIB.EXE utility which is
    supplied by DOS/Windows.


The official Microsoft's way to manipulate the file attributes.

    Windows 95/98 provide a system utility program, ATTRIB.EXE which
    is usually stored in the C:\Windows\command\ directory.

    Here is the ATTRIB utility's command syntax

    ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] filespec [/S]

       +   Sets an attribute.
       -   Clears an attribute.
       R   Read-only file attribute.
       A   Archive file attribute.
       S   System file attribute.
       H   Hidden file attribute.
       /S  Processes files in all directories in the specified path.

    For example if you want to clear the Archive attribute bit of all
    the files in a directory, execute the following command line.

       ATTRIB  -A c:\mydir\*


The Read-Only attribute.

    This bit is useful to make a file write-protected by software.
    For example, by setting the \AUTOEXEC.BAT file Read-only, you may
    protect the file from accidental deletion.  Or you may set a
    few files with the Read-only attributes and delete all the files
    using a "DEL *" (Delete all) command, the read only files will
    not be deleted under normal circumstances.  Certain files in the
    Win95/98 system are kept as Read-only by default (e.g., the system
    registry files).

    Before you can delete or overwrite a Read-only file, you must
    remove the Read-only file attribute bit.

    XXCOPY can force overwriting (or deletion) of a Read-only file by
    the /R switch.


The Hidden and System attribute.

    The purpose of the Hidden attribute bit is to make the file
    invisible in certain applications' file list display.  Since many
    file applications has the feature to ignore the Hidden attribute
    bit, the file with the Hidden attribute bit is not always invisible.

    The System attribute bit is probably the least rigorously
    defined in its usage.  From the early days of MS-DOS, the System
    attribute bit has been used in inconsistent manners that the bit
    seldom has much meaning.  The DIR command treat the System
    attribute similarly to the Hidden bit for directory listing.
    But, the COPY command does not care whether a file has the System
    attribute or not for copying it (Interestingly the DIR and COPY
    commands are both "built-in" commands which is implemented within
    the COMMAND.COM program).

    In most Win95/98 systems, you will find about twenty files in the
    root directory which are marked both Hidden and System.  These two
    attributes are often go hand in hand.  But, the choice seems
    quite arbitrary.

    While the usage of the Hidden and the System attribute bits are
    not well defined, the presence (or absence) of these attribute
    bits seldom change the actions of most system utilities except for
    the DIR and COPY commands, in most case, removing the Hidden and
    System attributes on most files do not cause any harm (except
    maybe some layer of protection from accidental erasure).

    XXCOPY by default (/H0) ignores a file with either Hidden or System
    attribute.  With the /H switch, you may include files with the
    Hidden or the System attributes in XXCOPY's copy action.


The Archive attribute.

    The Archive attribute was first introduced by MS-DOS version 2.0
    when the XCOPY utility was also created.  Therefore, the Archive
    attribute is probably best explained by how XCOPY handles the
    Archive attribute.  The purpose of the Archive attribute was clearly
    to quickly determine whether a file requires a back up (archiving).

    The Archive attribute is set whenever an existing file is either
    overwritten or modified (i.e., renamed or moved to another directory)
    by the file system.  A new file is usually created with the Archive
    attribute set.  The idea is to have a utility or application program
    to take the responsibility of clearing the Archive bit when a
    file is successfully backed up.  The next system backup operation
    will be made much more efficient by focusing only on the files with
    the Archive attribute bit set which are either newly created or
    modified in any way since all the Archive attributes are cleared the
    last time (i.e., the last backup time).


Incremental Backup using the Archive attribute.

    When XCOPY was the only "officially" designated system archive utility
    in MS-DOS, the Archive attribute had its usefulness.  Or, if only
    one backup regime in the system manipulates the Archive attribute bit
    and no other programs modifies the bit, the scheme works well.
    However, there are many backup and archive utilities that are
    capable of clearing the Archive attribute.

    Unfortunately, the operating systems do not enforce this
    "only-one-program-can-modify-the-Archive-bit" policy.  Because of
    possible interference with other applications which might clear the
    Archive attribute, we consider that the incremental backup scheme
    based upon the Archive attribute too risky to depend upon.

    Therefore, we do not recommend the use of the /M switch to perform
    any system backup operation.  For an incremental backup,  XXCOPY's
    /BI switch performs similar function with more confidence by
    comparing the files in the source and the destination with regard
    to the file size AND file date/time.  If either of the two does not
    match (or the file does not exist in the destination), the file will
    be copied.  This method is nearly as efficient as looking at the
    Archive bit.


Other usage of the Archive attribute.

    1.  You can determine which file(s) an application makes file
        changes (creation and modification) in a directory.  First,
        clear the Archive attribute of all the files in the given
        directory and run the application.  Then, check to see which
        files are marked by the Archive attribute.

        E.g.:  ATTRIB  -A c:\mydir\*       // clear the A bit first
               Run your application next
               XXCOPY  C:\mydir\*  /A/L    // list files with A bit set

    2.  Say, you have a directory with many files which you want to
        copy to a set of diskettes (one diskette cannot hold all of
        the files).  You can first set all the files with Archive
        attribute set first.  Then, run XXCOPY /M (or XCOPY /M).  The
        copy job will terminate as soon as the diskette becomes full.
        But the files which has already been copied are cleared of the
        Archive attribute.  So, run the same XXCOPY /M command again
        with a new diskette.  This time, the files which has been copied
        will be skipped.  Just repeat this operation until the files
        with Archive attribute run out.

        E.g.:  ATTRIB +A C:\mydir\*        // set the A bit set
               XXCOPY C:\mydir\*  A:\ /M   // copy files with A bit
               XXCOPY C:\mydir\*  A:\ /M   // repeat for next diskette
                 ...                       // continue until all files
                 ...                       // are copied.


Full Backup using the Archive attribute.

    We have stated that the use of the Archive attribute is not suitable
    for a reliable incremental backup.   However, once we abandon the
    notion that the Archive attribute serves as a persistent marker, it
    becomes even more useful.  Yes, the Archive bit as a temporary marker
    can be quite convenient.  The example in the preceding section of
    directory-copy to a set of diskette is a backup in a small scale.

    When you run Microsoft's ATTRIBUTE utility,

        ATTRIB  +A  C:\*  /S

    You will encounter the following messages:

        Not resetting hidden file C:\WINDOWS\...
        ...
        Sharing violation reading drive C
        Abort, Retry, Fail?

    In this case, entering "F" should let you continue.  But, apparently,
    the ATTRIB utility treats the "Fail" option as "Abort".  This is
    provably a bug in the Microsoft program.

    Well, XXCOPY will do what Microsoft fails to do.

        XXCOPY  C:\*  /S /AA

    The /AA and /AZ switches make XXCOPY to perform the same function
    similar to the ATTRIB utility does except it does a better job.
    XXCOPY's /AA switch sets (/AZ clears) the Archive attribute bit
    including the hidden files (it has automatically set the /H switch
    to include hidden files) and handles share-violation gracefully.
    If you need speed, you may suppress the console output by /Q or /Q2.

        XXCOPY  C:\*  /S /AA /Q    ;shows only the files which changes
        XXCOPY  C:\*  /S /AA /Q2   ;shows only statistics at the end

    After setting the Archive attribute bit of all the files in the
    volume, you can start repeated backup using the /M switch

        XXCOPY  C:\*  T:\mybackup   /S /M /H ...

        (change the target media when it is full and try again)

    You may apply the same basic technique to a full-scale volume backup
    using the Archive attribute.  This is quite useful when you are
    backing up a large volume into smaller removable medium
    (e.g., CD-R, CD-RW, Tape-based file system, or even floppy disk).

    If you have an AutoLoader tape drive (e.g., HP SureStore 12000),
    a working batch file example based on this scheme is available at
    http://www.datman.com/tbul/dmtb_038.htm.


List of XXCOPY's file attributes related switches.

    Archive bit

     /A0   Cancels *ALL* /A, /M, /AT, and /AX switches.
     /A    Excludes files without Archive bit set
     /AC   Ignores the Archive bit (always clears Archive bit)
     /M    Excludes files without Archive bit set (clears Archive bit)
     /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)

    Hidden and System bit

     /H0   Excludes files with Hidden or System Attributes bits (default)
     /Ho   Excludes files without Hidden or System Attributes bits.
     /H    Ignores the Hidden or System Attributes bits

    Destination Read Only bit

     /R0   Excludes a file when it exists in dst as read-only (default)
     /R    Allows overwrite/delete of a read-only file if necessary

    Destination file attributes

     /K0   Keeps the source attributes except the read-only bit (default)
     /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)



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #07



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: XXCOPY's Handling the case of Cyclic Copy
Date:    2004-12-18 (revised)
====================================================================

What is a Cyclic Copy?

    Try this with Microsoft's XCOPY (not XXCOPY).

        XCOPY  C:\  C:\temp\ /S

    You will be greeted by the following message:

        Cannot perform a cyclic copy.

    A cyclic copy refers to the situation where the source directory
    contains the destination directory.  Since the destination directory
    is part of the source, the copying process eventually starts copying
    the destination directory to a deeper portion of the destination.
    This process will continue until, of course, the finite disk space
    eventually runs out.

    To avoid this condition but to achieve the objective, one can
    specify a temporary destination which is on another volume (e.g.,
    D:\temp\) and later copy the temporary destination to the final
    destination, and delete the temporary directory at the end.


The safety net against a Cyclic Copy:

    Smart programs such as XCOPY have a detection mechanism to avert
    this disastrous situation.

    In many cases it is prudent for the copy utility to detect and avoid a
    cyclic copy.  After all, most such cases are simply a user mistake.
    Therefore, that was certainly adequate for XCOPY.  That's Microsoft.

    But, in other cases, you just want to create a copy of the whole
    volume into another subdirectory (of course, by excluding the
    destination).


Cases where a Cyclic Copy is useful:

    A Cyclic Copy is certainly useful with a combination with other
    switches such as /TR0 (create corresponding zero-byte files) or
    /T (make a directory tree without files).

    Or, you may be tempted to make a collection of certain data files
    into one directory:

        XXCOPY  C:\*.doc   c:\my_word\  /S

    Of course, it is senseless to let the recursive meltdown to occur
    by allowing the freshly copied files in the destination to partake
    in the copy process.  By now, it is quite apparent that what we
    really need is a mechanism to cut off this vicious cycle in the
    process.


Enter XXCOPY's new switch for Cyclic Copy.

    XXCOPY comes with a few variations to handle the cyclic copy case.

    /CC     Warns you for a cyclic copy case and gives you a prompt
            where you may terminate the process immediately, or
            you may let XXCOPY continue by adding the destination
            directory in the exclusion list.

    /CCY    Continues the copy operation by automatically adding
            the destination directory in the exclusion list without
            prompting the user (as if you typed "Y" at the prompt).

    /CC0    Terminates the copy operation unconditionally without prompt.
            This is the old XCOPY behavior --- hardly useful but if
            you want to emulate XCOPY, you may do so with this switch.


A few interesting examples taking advantage of the /CCY feature:

    XXCOPY  C:\*.doc  C:\my_word\  /CCY /S

           This example collects directories which contains .DOC
           files in the destination with the .DOC files.

    XXCOPY  C:\*.doc  C:\my_word\  /CCY /SX

           This is a variation of the fist example.  It uses XXCOPY's
           handy /SX switch.  It gathers all .DOC files from the entire
           volume and saves them in a flattened directory.  If you have
           little idea what a "flattened directory" is, just try it
           and examine the destination.  You will see what it is.

    XXCOPY  C:\  C:\skeleton\      /CCY /T

           This gives the whole volume tree (except the \skeleton
           itself) inside the destination without files.

    XXCOPY  C:\  C:\summary\       /CCY /E /TR0

           This one includes files without copying the file contents
           (creates zero-length files corresponding to the source).


    These operations are not possible using Microsoft's XCOPY.
    Incidentally, the explicit /CCY suppresses the warning message:
         
     "Detected a cyclic copy (the source includes the destination)."


© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #08



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: Short names made by Win95/98 and by WinNT/2K/XP
Date:    2003-10-14 (Revised)
====================================================================

In our earlier article, XXTB #03, we discussed the subtle problem
of long and short filenames commonly encountered by Windows users.
The problem has been widely known and various solutions have been
devised to handle most such cases.  XXCOPY can handle such cases
correctly in most cases.

Unfortunately, when you mix the two types of OS in operation, one
more potential problem may arise.


About the various Windows OS.

   Although all Windows operating systems except early ones (Win 3.x)
   support long filenames, there is a subtle difference in the
   algorithm of alias synthesis by the various OSes.  The difference
   may adversely affects XXCOPY's effort in preserving the short
   filename.

   First, let us examine the difference.  Windows 95 and 98 use a
   straightforward scheme in picking up the short name alia, whereas
   Windows NT4, NT5 and 2000 add a little twist in the way the numeric
   tail is generated.

   It is easy for anyone to observe the filename related idiosyncrasies.
   Just pick a file and repeatedly copy it in a directory under a series
   of long names having the same beginning.  For example:

        mkdir c:\temp
        copy  c:\autoexec.bat   c:\temp\mylongname1
        copy  c:\autoexec.bat   c:\temp\mylongname2
        copy  c:\autoexec.bat   c:\temp\mylongname3
        copy  c:\autoexec.bat   c:\temp\mylongname4
        copy  c:\autoexec.bat   c:\temp\mylongname5
        copy  c:\autoexec.bat   c:\temp\mylongname6
        copy  c:\autoexec.bat   c:\temp\mylongname7
        copy  c:\autoexec.bat   c:\temp\mylongname8
        copy  c:\autoexec.bat   c:\temp\mylongname9

   Then, using an appropriate tool, examine the destination directory.
   The following table shows the result of the copy operations in
   Windows 95/98 and the Windows NT/2000/XP variations.

        Longname         Windows 95/98/ME  Windows NT4/2K/XP
       ----------------------------------------------------------
        mylongname1          MYLONG~1          MYLONG~1
        mylongname2          MYLONG~2          MYLONG~2
        mylongname3          MYLONG~3          MYLONG~3
        mylongname4          MYLONG~4          MYLONG~4
        mylongname5          MYLONG~5          MYA476~1
        mylongname6          MYLONG~6          MYA486~1
        mylongname7          MYLONG~7          MYA496~1
        mylongname8          MYLONG~8          MYA4A6~1
        mylongname9          MYLONG~9          MYA4B6~1

   Whereas the Win9x OSes use a simple decimal number in the numeric
   tail, the WinNT family OSes follow the same pattern only in the
   first four cases.  After that, they start using a 4-digit
   hexadecimal number in the middle of the 8.3 name as the
   distinguishing part (only the first two letters remains the same).

   The hexadecimal value is probably a hash value for the string to
   supposedly shorten the filename matching operation which could be
   very time consuming.  Microsoft programmers chose to keep the first
   four match done numerically for the sake of compatibility to the
   Win9X systems.  What they failed to realize is that they allowed
   only the first four such names for compatibility.


The adverse effect of the two alias algorithms.

   As long as you use XXCOPY in a homogeneous environment where
   the files are generated under one OS, XXCOPY can preserve the
   short name.  But, when you have a mixed environment (e.g., with a
   dual-boot system), you may copy a directory with many similar
   names which were created under one OS and then perform a directory
   copy operation using XXCOPY under the other OS, XXCOPY may not be
   able to preserve the short name.

   One consolation is that the great majority of files will receive
   the correct short name alias using XXCOPY since the numeric tail of
   the first four aliases in a directory are common in all Windows OSes.
   Therefore the problem should be quite rare.  Ironically, if your
   system has many Microsoft software packages, you will find quite
   a few directories which all start like:

     "\Program Files\Microsoft xxxxx"

   One can argue that exactly because it is so rare, this phenomenon
   would not be widely known.  Therefore, when the rare problem occurs,
   it will take many agonizing hours for the user to discover the
   cause of the problem.


Then, what happens with XXCOPY?

   Since XXCOPY does not access the raw directory contents in the
   process of preserving the short name alias, its magic does not work
   all the time.  We cannot do much about this problem without making
   the XXCOPY utility breaking the rules of good programming practice.
   At least we can list the situations where the potential problem may
   arise and how you can it.

   1.  Stay within the 8.3 naming convention if possible.
   2.  Stay away from a dual-boot system if possible.
   3.  If you have a dual-boot system and you switch the OS from
       time to time, make sure a directory is written exclusively
       under one OS if possible.
   4.  Finally, when you have to copy a directory, use XXCOPY and
       perform the copy operation under the same OS in which the
       files in the directory were created.
   5.  In a networked environment with different types of OS between
       the source and the destination directories, expect the worst.

   Note that although it is ideal that when you copy a directory,
   all the files in the destination should be identical to those in
   the source, in most case, it is not the end of the world.  As a
   matter of fact, in most cases, the discrepancies in short names
   do not cause any problem.  As long as the files and directories
   that are affected by this problem is "non-system" files, the
   problem would be benign if present at all.

   In the case of Windows 95/98, the most well documented problem
   which are associated with the unmatched short name is a few
   directory and filenames which are stored in their short name
   alias in a few critical cases in the system registry.  Since
   Windows 95/98 references these files at the system initialization
   time (locating and loading VxD files using short names), the
   difference would be life and death (that is, success and failure
   in system initialization).


A final advice with XXCOPY:

   If you have a large number of collided aliases (where the short
   name distinctions are made by the synthesized numeric tail only),
   and you are copying across OSes (from Win95/98 to WinNT/2000/XP
   or vice versa), we suggest you turn off XXCOPY's short name
   preservation switch by /NX0 in order to avoid the time consuming
   and futile effort by XXCOPY.



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #09



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: Worldwide Network of Download Sites for XXCOPY
Date:    2001-07-10
====================================================================

If you have difficulties downloading the XXCOPY freeware copy
from our own server, select an ftp site which is close to you.

Our sincere thanks go to Simtel.Net which has the world-wide
network of mirror sites.

Unfortunately, due to the agreement with Simtel.Net we are unable
to provide direct links to the files.  You should visit the
following page which has the actuali links of the mirror sites:


   Simtel.Net List of Mrror sites



XXCOPY Freeware ver 2.60.0  (xxfw2600.zip)


FTP:// download sites
________________________________________________________________________

US, ALL (primary)        US, Arizona              US, Georgia 

US, Illinois             US, Indiana              US, Massachusetts

US, Missouri             US, New York             US, Oklahoma

US, Oregon               US, Pennsylvania         US, Virginia



Australia                Austria                  Belgium

Brazil                   Bulgaria                 Canada

Czech Republic           Denmark                  Finland

France                   Germany                  Hong Kong

Hungary                  Italy                    Japan

Netherlands              Norway                   Poland

Portugal                 Russia                   Singapore 

Slovenia                 South Africa             South Korea 

Spain                    Sweden                   Switzerland 

Thailand                 Turkey                   UK



HTTP:// download sites ________________________________________________________________________ US, Arizona US, Minnesota US, California US, Indiana US, New York Australia Austria Brazil Denmark Finland Germany Japan Norway Portugal Russia South Africa Spain UK

© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #10



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: Cloning the Win9x system disk using XXCOPY.
Date:    2003-11-07  (revised)
====================================================================

The disk clone operation has become one of the most popular usages of
the XXCOPY utility.  Therefore, I decided to have this dedicated
page just for the subject.  But, if you just arrived at this page
for the first time and have not really learned much about XXCOPY,
I would like to remind you that this Disk Clone capability is rather
a small portion of what XXCOPY can do for you.  If you are in a hurry,
go ahead and finish your disk clone job by following the instructions
below.  But, I suggest you come back and explore the rest of XXCOPY.

In this article, I would like to discuss the most common case of
disk cloning operation.  Some related topics which were once part
of this article are moved to another page, XXTB #20.

Note:  The technique discussed in this article applies primarily
       for Windows 9x and ME cases.  If your C: drive is loaded
       with Win NT4/2000/XP, you will not get a bootable disk.  If you
       have a dual-boot system (Win 9X and NT/2000/XP), then it is best
       you perform the operation from Win 9x.  But even in that case,
       the newly cloned drive will not be dual-bootable because XXCOPY
       does not touch the Master Boot Record (MBR) of a hard disk
       (we believe it should be handled by FDISK or other tools).

       As of this writing, we do not have a simple solution to reliably
       produce a bootable system disk for an NT4/2000/XP system using
       the XXCOPY utility.


System Disk Cloning:

    Say, you bought a hard disk with an astronomical number of bytes
    (at least, it seems that way for now), and you want to install
    your new drive as your system disk (Drive C:).

    Typically, you would connect the brand new drive to the EIDE
    port (either as the primary port's slave or the secondary port's
    master or slave --- whichever is available on your computer).
    Most new disk drives have the jumper setting printed on the top
    cover of the drive (the selection involves only master/slave).

    The overall procedure goes like this:  first, you connect the
    new drive and assign a temporary drive letter to it.  Then, copy
    the contents of the current Drive C: to the new drive's volume.
    Usually, the new drive has more capacity than the old one.
    Therefore, you can copy the entire C: drive to the new drive
    and still you will have much free space.  After the files are
    copied from the old drive to the new one, you will remove the
    old drive and place the new one as Drive C:.  It is quite
    straightforward.  Here, I assume your new drive will be
    temporarily assigned as Drive D:.

    Summarizing this, the sequence is as follows:

       . connect the new drive as D:
       . FDISK                         (initialize a partition)
       . FORMAT D:                     (init volume for file access)
       . XXCOPY C:\ D:\  /CLONE        (copy all the files)
       . connect the new drive as C:
       . FDISK                         (set active partition)



Step-by-Step Instructions:

    Now, let me go over the sequence, step-by-step with more details.
    If you have a printer, you may make a hard copy which will be
    handy for a beginner.

    In this article, the main drive is assumed to be C: and the
    Windows directory is located at C:\Windows.  If your settings
    are different, make necessary adjustments in the commands shown
    in this article.

         -----------------------------------------------------------
           How to create a DOS Box

              XXCOPY is a console application which is most
              conveniently launched from a DOS Box in Win9x.

              If you don't have an icon handy for DOS Box on desktop,
              you may create one by Right-click at an empty point in
              the desktop and click New > Shortcut.  Then, type in
              the box labeld Command line [ command.com ] and
              click [ Next ] and then click [ Finish ].
              Now, you will find an icon labeld "MS-DOS Prompt".

              Or, you may create a DOS Box directly by starting
              at the taskbar, click [ Start ] and click [ Run...].
              Then type in the box labeld Open [ command.com ] and
              click [ OK ].
         -----------------------------------------------------------


    0. Clean up the system disk

       Before you start the disk cloning operation, it is best if
       you clean up the original disk.  It is highly recommended
       that you run the SCANDISK utility.  Since some long-named
       files/directories are not reachable in DOS, you should run
       SCANDISK in the Win32 environment (the regular Windows 9X/NT/2K).

       Perform any additional cleaning up on the drive to remove
       garbage files which include the files generated by SCANDISK
       for retrieved data (check the root directory for names like
       FILE0000.CHK).  This is an ideal time to throw away other
       junk.  Don't forget to empty the Recycle Bin at the end.


    1. Making the system diskette

       The next hard disk preparation steps (FDISK and FORMAT) may
       be carried out either in a DOS box of Windows or in the
       real-mode DOS.  Since you need to boot the system from a
       diskette at least once (to run FDISK), it is usually faster
       if you perform the initial FDISK and FORMAT operations in
       the real-mode (DOS) environment created by the system diskette.

       If you have a Win9x boot diskette, you may skip this step.
       But, the boot diskette which you create using this method
       will take considerably less time to initialize the DOS
       environment (without the access to the CD-ROM but you don't
       need CD-ROM for this) than with the Win9x boot diskette.

       In a DOS Box, run the following commands to prepare a system
       diskette for the bootup, FDISK and FORMAT operations.

           FORMAT A: /S
           COPY  C:\WINDOWS\COMMAND\FDISK.EXE   A:\
           COPY  C:\WINDOWS\COMMAND\FORMAT.COM  A:\
           COPY  C:\WINDOWS\COMMAND\SYS.COM     A:\

       -------------------------------------------------------------
       Note:  In Windows ME, you have to run the "FORMAT" command
              without the /S switch which is no longer supported.
              Therefore, you need to run the following commands by
              hand from a DOS Box to achieve the same result.

                  FORMAT A:
                  COPY    C:\WINDOWS\COMMAND\EBD\IO.SYS      A:\
                  COPY    C:\WINDOWS\COMMAND\EBD\COMMAND.COM A:\
                  COPY    C:\WINDOWS\COMMAND\FDISK.EXE       A:\ 
                  COPY    C:\WINDOWS\COMMAND\FORMAT.COM      A:\ 
                  COPY    C:\WINDOWS\COMMAND\SYS.COM         A:\ 
       -------------------------------------------------------------

       Since you have plenty of room in the diskette, you may
       copy a few basic tools (we do not use any of them in this
       procedure).  If you don't know how to use them, skip this.

            EDIT.COM        (or your favorite text editor)
            XXCOPY16.EXE
            HIMEM.SYS
            SMARTDRV.EXE
            DOSKEY.COM
            ATTRIB.EXE
            DELTREE.EXE


    2. Attach the new disk as Drive D:

       Once you have a system diskette which can boot up the
       system, you can shut down the system now.

       If you have  not attached the new disk drive, now is
       the time to connect it as a non-boot disk by leaving
       the current system disk (Drive C:) as it is.  We assume
       your new drive is the 2nd drive (referred to as
       Drive 2 by FDISK).

       There is an well-written site which shows this step with
       good illustrations at Adding a 2nd Hard Drive.


    3. Initialize the new disk partition (FDISK)

       Power up the system and boot up using the system diskette.
       From the command prompt of DOS, run FDISK.EXE by typing:

           FDISK

       After confirming that you go along with the "Large Disk Support",
       Select choice 5 (Change current fixed disk drive), and enter
       the correct "Disk Drive Number".  After making the new drive
       the current disk drive, select choice 1 (Create DOS partition
       or Logical DOS Drive).  You now specify the space you allocate
       for the new partition (most people select 100%).  Exit FDISK.


    4. Initialize the new volume (FORMAT)

       After the new drive's partition is intialized by FDISK,
       reboot the system using the system diskette which you made in
       Step 1.  The next step is to format the new partition which
       can be done either in Windows' DOS Box or in the real DOS.  But,
       here we choose to boot up the system using the newly created
       diskette since it verifies that the diskette really works
       before we remove the current bootable hard disk.  Also, it
       is a bit faster.
       
       The diskette-reboot will lead you to a DOS prompt at A:\>.

       Before formatting the disk, you should check if the drive
       letter is right (you don't want to format the other drive).

           DIR D:

       The system should complain by saying:

           Invalid media type reading drive D
           Abort, Retry, Fail?

       This is exactly what you want with the partition which was
       just initialized by FDISK, but has not been formatted.  If you
       see any other message, you should run FDISK, select 5
       (Change current fixed disk drive) in the main menu, and
       examine the overview of the disk partitions.  The listing
       conveniently displays both the disk number (1, 2, etc.)
       and the drive letter assigned to the various partitions.
       Type ESC a few times to exit the FDISK utility.

       Once you are sure of the drive letter, run the next command.

           FORMAT D:

       This time, it may take some time (depending on the capacity
       of the drive) while the sectors are verified for read/write
       operations.  Before the FORMAT command finishes its job,
       it will prompt you to enter the volume name.  You may enter
       any name (up to 11 characters).  I urge you to name it
       something rather than leaving it blank.

       Once the volume is formatted, you may access the drive now.
       Just type the following command in a DOS Box.

           DIR D:

        If you see lines like this, then it is good.

              Volume in drive D is XXXXXXXXX
              Volume Serial Number is 1234-5678
              Directory of D:\
              ...


    5. Reboot after format (back to Windows 9x)

       Although it is possible to enter Windows from this
       environment (provided that you installed HIMEM.SYS),
       we do not recommend doing so at this point.  Remove
       the system diskette from the floppy drive and reboot
       the system and enter the regular Windows environment.

          -----------------------------------------------------
           If you were preparing the new partition inside a
           DOS Box, rather than in real-mode DOS, you could
           access the volume and proceed to the next step
           (XXCOPY /CLONE), but you should still reboot now.
           Because after a volume is formatted, it remains
           in the so-called "MS-DOS compatibility mode" where
           the disk I/O cache is disabled.  Without a reboot
           after a format, file access to the volume will be
           extremely slow --- the XXCOPY action would take
           literally hours rather than minutes without reboot!
          -----------------------------------------------------


    6. Duplicate the volume (XXCOPY /CLONE)

       Once you have prepared the new disk with FDISK and FORMAT,
       you are ready to run the centerpiece of this procedure.
       This step is the most important operation in the entire
       procedure.  You must be in the Win32 environment, that is
       you must enter the Windows' GUI world (not booting into
       the "Command Prompt Only" (real mode, DOS) environment.
       Then, open up a DOS Box.  When you have followed the standard
       XXCOPY installation procedure, XXCOPY.EXE should be present at
       the \Windows\command directory so that XXCOPY is the "path".

       Run the following command from a DOS Box.

           XXCOPY  C:\  D:\  /CLONE

          ----------------------------------------------------------
           The /CLONE switch looks deceptively simple. But,
           it is actually a combination of eight distinct
           switches.  Much of XXCOPY's flexibility comes from
           combining a variety of switches.  This particular
           case is equivalent to the following command.

             XXCOPY  C:\  D:\  /ks/h/e/r/q/y/bi/zy/ze

               Explanation:

               /ks ; keeps source files' attributes exactly
               /h  ; copies hidden and system files
               /e  ; copies subdirectories (including empty ones)
               /r  ; overwrites read-only files if such files exist
               /q  ; suppresses display of skipped file in backup
               /y  ; overwrites existing files without prompt
               /bi ; backs up incrementally (skips identical files)
               /zy ; deletes extra files in destination if present
               /ze ; disables XXCOPY's use of Envrionment variables
          ----------------------------------------------------------

       The XXCOPY operation takes anywhere from 10 minutes to
       over several hours, depending on the amount of data you
       transfer (typically 2-15 GB/hr)..


    7. While XXCOPY /CLONE is in progress...

       When XXCOPY is carrying out the clone operation, you don't
       have to sit idle.  You may actively use the computer as
       usual, browsing the Web, operate a word processor, or use
       spreadsheet --- whatever.  Just consider the on-going
       XXCOPY operation a background task.  There may be a few
       files which may not be copied the first time due to
       file-access contention.  That is expected and not a serious
       problem at all.

       Once the first round of XXCOPY /CLONE operation is over,
       finish your foreground work, close all active programs
       at this point.  Then, run the exactly same command again.

           XXCOPY  C:\  D:\  /CLONE

       The key here is that the /CLONE operation behaves as an
       incremental backup (by the virtue of the /BI component).
       It compares the source volume and the destination volume
       and skips files which already exist in the destination
       with the same size and time.  The second /CLONE step
       should take only a few minutes at most.

       You may still observe a few failed copies.  The most
       notable one in the Win9x system is the virtual memory
       swap file (WIN386.SWP).  In the case of Win NT4 and
       Win 2000, the equivalent file is named PAGEFILE.SYS.
       It is safe to ignore these swap files.

       You may run the /CLONE command as many times as you like:

           XXCOPY  C:\  D:\  /CLONE


    8. After XXCOPY /CLONE is complete.

       When the entire volume has been copied by XXCOPY, you are
       ready to remove the old Drive C: and connect the new drive
       as your new Drive C:.  Shut down your Win9x system now,
       and reconfigure your hard disks. You may need to remove
       the jumper plug which made it a slave drive.  You may also
       need to adjust the BIOS setting (Primary/Secondary IDE,
       Master/Slave drive parameters).  All recent models of
       motherboard come with a BIOS which has the AUTO sense mode
       which is trouble-free.  If you select a manual setting,
       you may need to adjust the hard disk paramters.


    9. Make the new partition "Active" (FDISK).

       Since the new drive is still not bootable, but it has to
       be connected as Drive C: since FDISK can activate only the
       first disk drive's (Drive C) Primary DOS Partition.  So,
       we need the system diskette once more to boot the system.

       Now, the remaining thing is to make the new drive bootable.
       The Master Boot Record (MBR) must contain the partition table
       where the Primary DOS partition is set "Active".

           FDISK

       Select choice 2 in the first FDISK menu (Set active partition).
       When you display Partition Information by choice 4, the main
       partition should show Status 'A' (for Active partition).
       Pressing the ESC key will terminate the FDISK utility.

   10. Make the new drive bootable (FDISK).

       The normal FDISK operation you have just performed modifies
       the contents of the partition table in the first logical
       sector of the drive (MBR).  But, the operation does not
       change the section of the MBR which contains the bootstrap
       program (a very small machine-language program which will
       receive control of the system at the very beginning of the
       system bootup process).  FDISK has a "well known" undocumented
       feature which initializes the bootstrap program inside the MBR.
       Run the following command line.
       
           FDISK /MBR 

       Unlike the regular interactive FDISK operation, with the
       /MBR switch, it quietly carries out the MBR-initialization
       operation.  As a matter of fact, it does not say anything.
       If you are a bit nervous, visit the following Microsoft site:
       
         Q69013: FISK /MBR Rewrites the Master Boot Record.

       Microsoft documents this feature in the article and yet it
       calls this feature "undocumented" in the article itself!!!
       So, I guess it remains undocumented...  

   11. Boot to the Windows (DONE)

       Remove the system diskette from the floppy drive and
       let the system boot from the new Drive C: to windows.
       You may just leave the original system disk (now as D:)
       for daily backup storage.  If you set up a well written
       backup batch file script (using XXCOPY of course), you
       may use a much smaller disk drive for system drive
       backup.

   12. If the new disk has a difficulty in booting up by itself,
       consider running the SYS command.  If you follow all of the
       steps described above, you need not run the SYS command.
       However, if you skipped the format step, the boot sector
       may not have proper boot code.  Or, if your procedure
       is slightly deviated from the above steps in any way, the
       boot sector may not have been properly initialized.  At any
       event, it does not hurt to run this step.  From the DOS
       prompt using the system disktte, run the following command:
       
           SYS  A:  C:
           
       This procedure copies IO.SYS, MSDOS.SYS, and COMMAND.COM
       from the diskette to the root directory of the C: drive
       (which is not necessary) and also re-initializes the
       boot sector of the C: drive.  (The boot sector is usually
       initialized when the volume is formatted.)  Now, you can
       try rebooting from the hard disk.

  ================================================================


Q and A about Disk Cloning:

  Q:  Can I stay in DOS (real mode) to duplicate the disk using
      XXCOPY16?

  A:  We strongly recommend the use of XXCOPY.EXE (the 32-bit
      version which must run under the Win32 environment), as
      described in this page.  When you stay in the DOS (real mode)
      environment, you may not be able to access all the files and
      directories in your disk drive.  This is due to the fact that
      the DOS environment cannot handle a pathname which exceeds
      the 80 character limit.  Although each long name comes with
      its short name (8.3 format) alias, there could still be a
      heavily nested, very long path which exceeds the 80-character
      limit after converting all of the long directory names into
      their short name alias (for the same reason, SCANDISK fails
      on certain volume in 16-bit mode).

      If all of the files in your drive have a full pathname less
      than 80 characters, you can use XXCOPY16 with the /CLONE switch
      to create an interim copy of the source disk which can be made
      bootable.  After you boot into the Win9x environment, you
      should convert all of the shortnames in your system disk
      into the corresponding longname using the following command
      (assuming the D: drive is the original source drive)

         XXCOPY D:\  C:\  /S  /NL

      This procedure lets you restore most of the long filenames.
      However, there will be a small number of files and directories
      which are made prior to this XXCOPY run (immediately after the
      first Win9x initialization).  That is, you need to perform
      additional procedures by hand to make necessary adjustments.
      In short, this procedure is troublesome at best and we don't
      recommend it to anyone who asks this question in the first place.


  Q:  I thought you need to use the /S option when you format the
      new hard disk in disk in order to make the drive bootable.
      Why?

  A:  It is true that you should take advantage of the /S switch
      when you make the boot diskette as

          FORMAT A: /S

      The bare FORMAT command formats the media (which tests the
      sectors and initializes the FAT and the root directory).
      With the /S switch, it performs additional file copy
      operation. (COMMAND.COM, IO.SYS, MSDOS.SYS, and DRVSPACE.BIN).
      Since the XXCOPY /CLONE procedure copies these system files
      anyway (provided that the source volume contains these files),
      it is redundant to run "FORMAT D:"  with the /S switch when
      you initialize the new hard disk (it does not hurt though).


  Q:  I did not find the "SYS" command in the sequence you showed.
      Why can you skip this step?

  A:  The SYS command performs the equivalent of the "/S" switch
      in the FORMAT command.  For the same reason mentioned above,
      you can skip the SYS command when you run XXCOPY /CLONE.
      Some people believe that the SYS command initializes the
      MBR (see below) to make the drive bootable.  This is not
      correct.  The MBR is usually managed by FDISK. Not by
      FORMAT or SYS utilities.  (Also, see Step 12.)


  Q:  In which steps does the Master Boot Record (MBR) of the new
      drive initialized?

  A:  If you follow the step-by-step instructions described in
      this page, you should notice that you use the FDISK utility
      three times.  The first time, you will initialize the primary
      partition of the new drive.  At that time, the drive is
      tentatively assigned as a non-bootable drive (e.g., D:).
      Unfortunately, FDISK does not allow you to make the primary
      DOS partition of the new disk "Active".  For some reason,
      FDISK sets only the first drive's (C:) primary partition
      "active".  That is why in the above procedure, you need to
      boot up the system using the boot diskette.  In your second
      invocation of FDISK, you make the primary DOS partition
      "Active".  Then, the the third time with the FDISK /MBR
      switch, the bootstrap section of the MBR is initalized.


  Q:  Can you write (or read)  the MBR using XXCOPY?

  A:  No.  XXCOPY does *NOT* touch the MBR block which is the
      very first logical sector of the volume.  It contains both
      the partition information and the system initialization
      code (a very tightly written machine language program).
      We strongly believe that a "well-behaving" program such
      as XXCOPY must not touch the area of the disk which is
      handled by specialized tools.  In this case, FDISk is the
      official utility whose only job is to manage the contents
      of MBR.  Microsoft's utilities FDISK and FORMAT have never
      been combined to be just one simple utility for this very
      reason.  In the future we may make add a MBR backup
      feature.  But, it is a dangerous operation at best.
      Of course, we all know how bad Microsoft's FDISK design is.
      But, it gets the job done..


  For more on cloning, see XXTB #20.

  Click the download file (the line below) when you are ready.

     http://www.xxcopy.com/download/xxcopy.zip

 [ This page may be accessed by its alias, http://www.xxcopy.com/clone ]


© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #11



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: XXCOPY Cookbook: Recipes of common usages
Date:    2001-03-03
====================================================================

A few examples are often more useful than pages of rigorous and
boring definitions and reference material.

--------------------------------------------------------------------
Select files that are made on or after February 1st, 2000.

  XXCOPY  c:\srcdir\  d:\dstdir\  /DA:2000-02-01


--------------------------------------------------------------------
Select files that are made before January 1st, 2000.

  XXCOPY  c:\srcdir\  d:\dstdir\  /DB:1999-12-31

    Note: The date for /DA and /DB is inclusive of the date.


--------------------------------------------------------------------
Select files that are made today.

  XXCOPY  c:\src\  c:\temp\   /Do:. /S

    Note: /DB:.  selects files of yesterday or earlier
          /DA:.  selects files of today (and with future dates)
         (see below for a variation)


--------------------------------------------------------------------
Select all the files in the entire volume which are made today

  XXCOPY  c:\    c:\temp\   /Do:. /S /CCY

    Note: this is a case of cyclic copy situation where the
          destination is a part of the source directory (the root),
          which requires the /CC switch to avoid a recursive meltdown.
          Here, /CCY (with the Y at the end) suppresses the warning
          message for the case.

  XXCOPY  c:\    c:\temp\   /Do:. /SX /CCY

          This variation (with /SX) creates a flat list of files
          in the \temp directory.  By substituting the subdirectory
          delimiter character (backslash) by another character,
          the files in the destination are easily examined.


--------------------------------------------------------------------
Select files that are modified (or newly created) today (or after).

  XXCOPY  c:\srcdir\  d:\dstdir\  /DA:.
  XXCOPY  c:\srcdir\  d:\dstdir\  /DA#.
  XXCOPY  c:\srcdir\  d:\dstdir\  /DA#0

    All of the above will give you exactly the same result.

    Note: the single dot "." is a shortcut for TODAY's date
          when used with the "After" prefix.

    Although in most system, you seldom find a file with a future
    date, the operating system does not prohibit a program from
    setting any legal time.


--------------------------------------------------------------------
Select files that are created today (or after).

  XXCOPY  c:\srcdir\  d:\dstdir\  /FC/DA:.
  XXCOPY  c:\srcdir\  d:\dstdir\  /FC/DA#.
  XXCOPY  c:\srcdir\  d:\dstdir\  /FC/DA#0


    All of the above will give you exactly the same result.

    Note: the single dot "." is a shortcut for TODAY's date
          when used with the "After" prefix.

    Although in most system, you seldom find files dates which
    are "newer" than the current time, the operating system does
    not prohibit a program from setting file time as such.


--------------------------------------------------------------------
Select files that are made within the past 45 minutes.

  XXCOPY  c:\src\  c:\temp\   /S  /DA#30M

    Note: /DA#30M   The age parameter after /DA# (or /DB#) may be
                    appended with a suffix (D, H, M, or S for Days,

    Variations:
    
          /DA#10      10 days (Days if no suffix)
          /DA#365D   365 days
          /DA#90M     90 minutes (1 hr 30 min)
          /DA#330S   330 seconds (5 min 30 sec).
          /DB#36H     46 hours or before


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

Select files that are made on or before yesterday.

  XXCOPY  c:\srcdir\  d:\dstdir\  /DB:.
  XXCOPY  c:\srcdir\  d:\dstdir\  /DB#.
  XXCOPY  c:\srcdir\  d:\dstdir\  /DB#1

    All of the above will give you exactly the same result.

    Note: the single dot "." is a shortcut for YESTERDAY's date
          when used with the "Before" prefix.

 Caution: The meaning of the dot "." character used in conjunction
          with the "B(efore)" prefix is different from that with
          the "A(fter)".  That is because "On-or-Before-Today" is
          hardly ever used and there is no use to designate a
          special shortcut for it.  On the other hand, the number
          of days specified with the "#" prefix always counts the
          days from today (which is designated by #0).

--------------------------------------------------------------------
Select files that are older than 30 days.

  XXCOPY  c:\srcdir\  d:\dstdir\  /DB#31

    Note: /DB#30  would include the 30th day.


--------------------------------------------------------------------
Select files that are 30-60 days old.

  XXCOPY  c:\srcdir\  d:\dstdir\  /DB#30 /DA#60


--------------------------------------------------------------------
Select files that are *NOT* 30-60 days old.

  XXCOPY  c:\srcdir\  d:\dstdir\  /DA#29 /DB#61


--------------------------------------------------------------------
Select files that are 6-12 hours old.

  XXCOPY  c:\srcdir\  d:\dstdir\  /DB#6H /DA#12H


--------------------------------------------------------------------
Copy files and remove extra files in the destination

  XXCOPY \src\  \dst\  /Z

    The /Z switch remove all files in the destination whose
    counterpart is not present in the source.  In this most
    primitive form, the /Z switch itself does not check whether
    the remaining files are the same or not.  But, in this
    particular case, all files in the \src directory will be
    copied to the \dst directory.  If the file to be copied to
    the destination is brand new (no file with the same name
    exists in the destination), then the file will be copied
    quietly.  The file that exists in the destination will give
    you a warning for overwrite (Yes/No/All).  If you say No,
    then, the old file will be left alone --- possibly causing
    some mismatch in file.  You may automate this command by
    adding /Y which is equivalent of typing 'Y' to all prompts.
    But, for each extra file to be deleted from the destination,
    XXCOPY will give you another warning with Yes/No/All prompt.

  XXCOPY \src\  \dst\  /Y /ZY

    This variation suppresses the two types of warning prompts.
    But, in order to make the two directories really the same,
    a number of additional consideration must be made.

    1. hidden and system files are not included in a normal copy.
    2. subdirectories in the directory should be included.
    3. you may want to preserve the file attributes exactly.
    4. a read-only file in destination would prevent an overwrite.

    So, you need a combination of more switches to really make
    two directory the same (see below).

  Caution:

    The /CLONE, /Z, and /ZY switch performs deletion of extra
    directories and files in the destination.  If you inadvertently
    specify a wrong destination, the consequence will be very
    severe.  Some careless users have lost many files by this!!!


--------------------------------------------------------------------
Variations in directory synchronization to F: (e.g., a Zip disk).

  XXCOPY  "C:\My Documents\" F:\        /KS/H/E/R/Q/Y/BI/ZY

    This example is the standard way to duplicate the source
    directory at the destination.

      /KS    Keeps the file attributes of the source exactly
      /H     Includes hidden and/or system files
      /E     Copies subdirectories including empty ones
      /R     Overwrites existing files that are read-only
      /Q     Suppresses display for skipped files
      /Y     Suppresses the Y/N/A prompt for a file overwrite
      /BI    Backs up incrementally (skips file with same size/time)
      /ZY    Deletes extra files in destination (without Y/N prompt)

      Note that the first argument was surrounded by a pair of
      double-quotes (").  This was necessitated by the presence of
      embedded space (between My and Documents).

  Caution:

    The /CLONE, /Z, and /ZY switch performs deletion of extra
    directories and files in the destination.  If you inadvertently
    specify a wrong destination, the consequence will be very
    severe.  Some careless users have lost many files by this!!!


  XXCOPY  "C:\My Documents\" F:\        /CLONE

    The /CLONE switch is equivalent to typing the /KS/H/E/R/Q/Y/BI/ZY
    combination.

  XXCOPY  "C:\My Documents\" F:\MYDOC   /CLONE/I
  XXCOPY  "C:\My Documents\" F:\MYDOC\  /CLONE

    These variations show the use of subdirectory in the destination.
    The /I switch or the trailing backslash in the destination name
    suppresses a possible Y/N prompt in case the destination
    directory does not exist.

    When you use a removable media (e.g., a diskette, or Zip disk),
    you should just reverse the action on the target system.

  XXCOPY  F:\   "C:\My Documents\"      /CLONE

    In this example, any extra files that exists on the target
    system will be deleted.  If you do not want to delete any of
    existing files (or directories), you should do the following:

  XXCOPY  F:\   "C:\My Documents\"      /CLONE /Z0

    The /Z0 switch after /CLONE will negate the /ZY switch which
    is declared within the super /CLONE switch.  This command
    will leave any additional files and directory in the destination
    untouched.

    Note that if any opposing or mutually exclusive switches exist
    on a command line, they are interpreted from left to right.
    Therefore, if you place /Z0 before /CLONE, the effect of /Z0
    will be lost.


--------------------------------------------------------------------
Cloning a DOS/Win9x drive to another

  XXCOPY  C:\  D:\     /CLONE

    Cannot be simpler than this!!!  The above section scrutinizes
    exact meaning of /CLONE in terms of its true switch components.
    This command is repeatable (first time, you run this command
    in background while you continue using the system).  While you
    are running this command, you may type a Ctrl-C or Ctrl-Break
    to abort the command.  You can always run the exactly same
    command to resume where you stopped the last time.  While you
    are running this command in the background, a number of files
    may be created.  No problem.  When you are ready for the final
    round, just stop all activities and just run the command once
    more.  It will quickly save the newly created file.  Usually,
    the virtual memory swap file (WIN386.SWP) cannot be accessed
    when you run Win9x.  For all practical purposes, this file
    need not be duplicated in order to use the drive as the system
    (bootable) drive.  You need not format the hard disk as the
    system disk prior to running this XXCOPY command.  Nor you need
    to run the SYS.COM command (to transfer the system files).
    All hidden/system files necessary to boot the system will be
    there.

  Caution:

    The /CLONE, /Z, and /ZY switch performs deletion of extra
    directories and files in the destination.  If you inadvertently
    specify a wrong destination, the consequence will be very
    severe.  Some careless users have lost many files by this!!!

  Note:

    The only thing which may be missing from the newly cloned disk
    is the Master Boot Record (MBR) which is not really a file.
    The first logical sector (512 bytes) on the drive is called MBR
    which must be initialized by FDISK (or by some third party
    products).  Keep a bootable diskette with FDISK.EXE handy.
    After connecting the new drive as the first drive (FDISK
    call the first drive DISK 1), reboot the system using the
    bootable diskette, run FDISK and make the first Primary DOS
    partition Active.

  Note:

    We do not recommend using XXCOPY16 to clone the entire drive.
    (details are discussed the XXCOPY10.HTM article).


    A complete discussion is found in another article (XXTB #10)


--------------------------------------------------------------------
Coping files from another computer on a network.

  XXCOPY  \\myserver\c\yourdocs\*.doc   c:\mydocs\

    This command copies all .DOC files (Microsoft's Word document)
    from a computer named "myserver", drive named 'C'. directory
    named \yourdocs\.  The source name starting with two consecutive
    backslashes are so-called UNC (Universal Naming Convention) name.
    When a resource (such as a hard disk) is made sharable to other
    users outside the computer, the resource must be given a name.
    Usually Drive C is named just 'C' by convention (NetWare encouraged
    the naming like "DRIVEC").  Therefore, the "root" of the remote
    resource over the network will not be the computer name alone.
    At the minimum, you need to specify the resource name for the
    drive (such as \\myserver\c\" which will act as the root directory
    of the volume).  In this example, the source directory is locally
    (on the computer) known as C:\dest\.


--------------------------------------------------------------------
Coping files to another computer on a network.

  XXCOPY  c:\mydir\*.doc    \\myserver\c\dest\

    The UNC path specifier can be used for the destination directory.

    Caution:  If the target resource is available on a read-only
    basis, then, it cannot be made the destination of copy operation.
    Some system allows you to access only on a read-only basis.  In
    that case, you can read the files but cannot write to the
    directory, rename or, delete.  Any modification of the contents
    is considered a write-access.

    Check with your network administrator for details.


--------------------------------------------------------------------
List up device driver files of certain date.

  XXCOPY  c:\Windows\*.DLL      /S /L /DO:1999-04-23

    The date shown here happens to be one of the Microsoft release
    dates.  The DLL files originally installed from the setup
    CD-ROM will be listed by this command.

  XXCOPY  c:\Windows\system\*.DLL  /L /DO:1999-04-23

    This is a variation of the above, without /S so that the listing
    is made only from the specified directory.


--------------------------------------------------------------------
Create a list of all files in the volume.

  XXCOPY  c:\  c:\mylist\   /H /E /TR0 /CCY /KN

    This command creates a directory entry for each and every file
    in the volume in the destination directory.  The file contents
    are not copied (using /TR0 to limit the new file to be 0 byte).
    It effectively create a catalog of existing files.  /CCY prevents
    the cyclic copy meltdown. /H includes hidden files.  /KN is an
    optional switch to convert hidden/system files to visible file
    for your convenience (you may drop this switch).

  XXCOPY  c:\  c:\mylist\   /KS /H /E /R /Q /Y /BX /ZY /TR0 /CCY

    A variation to the one before.  This command synchronizes the
    file list created earlier by removing extra files (/ZY) and
    adding those files that has different file time (/BX).  Although
    we could have chosen /KN as before.  But, we chose to use a
    different way to save the file attributes using /KS.  It retains
    the same file attributes as they are in the source directory
    --- which in turn necessitates /R which is needed to overwrite
    read-only files.  Here, the /BX is a superior choice to /BB
    because /BX rewrites the file which had a different file time
    whereas /BB would skip the file which already exists --- leaving
    files with old file time without being updated).  /BX is better
    than /BI (which checks both file time and file size).  That's
    because with /BI, the presence of /TR0 forces the file size to
    be different (0 byte) for nearly all files, almost all files
    would be rewritten.

  Caution:

    The /CLONE, /Z, and /ZY switch performs deletion of extra
    directories and files in the destination.  If you inadvertently
    specify a wrong destination, the consequence will be very
    severe.  Some careless users have lost many files by this!!!


--------------------------------------------------------------------
Copy files and delete them from the source (i.e., move files).

  XXCOPY \src\  \dst\  /RCY /S

    The /RC switch stands for Remove-after-Copy.  The Y suffix
    suppresses the (Y/N/A) prompt on each file delete.  To suppress
    the (Y/N/A) prompt for file-overwrite cases, add /Y.  /S goes
    through subdirectories.  Of course, you may add other common
    switches such as /H (include hidden/system files), and
    /R (overwrites even read-only files),


--------------------------------------------------------------------
Delete files which are present in the reference directory

  XXCOPY c:\src\*.doc  d:\reference\   /RS /U

    The /RS switch removes files in the first (src) directory which
    matches the template (*.doc).  The /U switch specifies that the
    delete operation will be performed on files that are present
    in both the ssrc directory and the reference directory.  To
    understand the file selection mechanism, first consider this is
    an ordinary file-copy operation.  If so, the /U switch (which
    stands for "update") selects files which exists on the
    destination directory.  The /RS switch changes the mode of
    operation from file-copying to file-deletion.  But, the file
    selection mechanism is identical.


--------------------------------------------------------------------
Clean up the Windows temporary directory

  XXCOPY %TEMP%\  /RS /DB#1 /R /H /PD0 /Y /ED

      /RS    Removes files in the source (the only) directory
      /DB#1  Selects files made on or before yesterday
      /R     Deletes even a read-only file
      /H     Deletes even a hidden/system file
      /PD0   Suppresses the prompt which would appear on a directory
      /Y     Suppresses the prompt prior to each file-delete
      /ED    Preserves the directory even if it becomes empty

      In the standard Win9x system setup, the %TEMP%  Environment
      variable is set to the Windows designated temporary directory
      (usually C:\Windows\temp).

      By specifying the files that were made on yesterday or earlier,
      this command will not accidentally delete files that may be
      still in use in the current session (i.e., files created today).


--------------------------------------------------------------------
Treatments of redundant files

  XXCOPY c:\src\*.doc  d:\dst\   /BI /S

    This command is a common case where incremental backup is
    performed on a selected (*.doc) files in the source (and its
    subdirectory).  The /BI switch skips files that are already
    present in the destination with the same file time and size.
    That is, files which are different or the files that are
    new to the destination will be copied.

  XXCOPY c:\src\*.doc  d:\dst\   /BS /S

    This is a hypothetical command and such an operation is seldom
    carried out.  But, it helps understand what /BS does.  /BS is a
    strange switch for an ordinary copy operations.  That is because
    /BS (Backup Same) is exact opposite of /BI (Backup Incremental).
    It selects and copies files that are identical in file date and
    the size --- which results in no net change!!!  The /BS is not
    useful under normal circumstances (unless you want to exercise
    the hard drive for testing purposes).

  XXCOPY c:\src\*.doc  d:\reference\   /RS /BS /S

    The funny /BS switch now makes a lot of sense when combined
    with /RS (remove files in source).  Files which are present
    in both the source and reference directories will be examined
    with respect to the file time and file size.

    Here, the files with the same file time and size which matches
    the pattern (*.doc) in the source directory (/S specifies its
    subdirectories) will be removed.

  XXCOPY c:\src\*.doc  d:\reference\   /RS /BS /S /L

    The /L switch gives you a list of files which would be
    selected by the duplicate-elimination operation.

  XXCOPY c:\src\*.doc  d:\reference\   /BS /S /L

    For that matter, the presence of /RS makes no difference
    because, /L has precedence over /RS.  Therefore, the operation
    becomes file-listing only.


--------------------------------------------------------------------
Eliminate redundant files (delete identical files)

  XXCOPY c:\src\*.doc  d:\reference\   /RS /BS /S

    This is another RS variation.  Again, two directories are
    given (the second directory provides the reference files for
    comparison).  /BS is a strange switch for an ordinary copy
    operations.  That is because /BS (Backup Same) is exact opposite
    of /BI (Backup Incremental).  The BI switch compares a pair
    of files between the source and destination and checks whether
    the pair of files have the same file-time and size.  If both
    matches, the two files are considered to be the same and file
    copy will be skipped.  Being the exact opposite of /BI, the BS
    switch would normally copy only identical files --- which
    results in no net change!!!  But, the file selection mechanism
    makes a lot of sense when it is applied for file deletion.

    Here, the files with the same file time and size which matches
    the pattern (*.doc) in the source directory (/S specifies its
    subdirectories) will be removed.


  XXCOPY c:\src\*.doc  d:\reference\   /RS /BS /S /L

    The /L switch gives you a list of files which would be
    selected by the duplicate-elimination operation.

  XXCOPY c:\src\*.doc  d:\reference\   /BS /S /L

    For that matter, the presence of /RS makes no difference
    because, /L has precedence over /RS.  Therefore, the operation
    becomes file-listing only.


--------------------------------------------------------------------
Remove files in all subdirectories but leave certain files.

  XXCOPY c:\mydir\  /RMDIR /Y /Xtemplate.* /X*.doc

    /RMDIR is like DELTREE.  Here, /Y suppresses confirmation.
    The two /X switches specify filename patterns to avoid
    deletion.


--------------------------------------------------------------------
Three-way Differential Backup

  The scheme works like this:

  1.  Initially you make a full backup from \src\ to \ref\.
  2.  Later, you want to perform a daily differential backup
      from \src\ to \dst\ using the difference between \src\ and \ref.

  The initial step is usually a full backup

    XXCOPY  \src\  \ref\  /CLONE

  The daily differential backup requires three steps as follows
  (for illustration purpose, common switches are deliberately left
  out here).

    XXCOPY  \src\          /AZ
    XXCOPY  \src\  \ref\   /AA /BI
    XXCOPY  \src\  \dst\   /A

    The first step clears the archive bit of every file in the source.
    The second step sets the archive bit of the files you select.
    The third step performs the actual file copy.

  Very common cases (subdirectory included, hidden files also copied)

    XXCOPY  \src\          /AZ     /S
    XXCOPY  \src\  \ref\   /AA /BI /S /H
    XXCOPY  \src\  \dst\   /A      /S /H /KS

  With a twist of incrementally do the three-way differential backup
  to the same destination every day (remove extra files)

    XXCOPY  \src\          /AZ     /S
    XXCOPY  \src\  \ref\   /AA /BI /S /H
    XXCOPY  \src\  \dst\   /A      /S /H /KS /ZY

  Caution:

    The /CLONE, /Z, and /ZY switch performs deletion of extra
    directories and files in the destination.  If you inadvertently
    specify a wrong destination, the consequence will be very
    severe.  Some careless users have lost many files by this!!!


--------------------------------------------------------------------
Differential Backup using a skeleton directory.

  This scheme is similar to the Three-way differential backup
  described above.  In that case, the reference directory \ref\,
  consumes a relatively large storage space just to provide the
  reference (where the file contents are never referenced).
  This variation drastically cuts down the storage usage by the
  reference directory by storing only zero-length files.  It
  still allows you to compare filename and the file date as the
  criteria for differential backup.  In other words, the skeleton
  directory serves as a file set specifier for regularly performed
  backup.

  The initial step here uses /TR0 to make zero-length files.

    XXCOPY  \src\  \ref\  /CLONE /TR0

  You may remove whatever files you are not interested in
  backing up (such as WIN386.SWP), thereafter in order to
  make the most desired file set in the reference directory

  The daily differential backup in this case uses /U to
  (for illustration purpose, common switches are deliberately left
  out here).

    XXCOPY  \src\          /AZ /S
    XXCOPY  \src\  \ref\   /AA /S /H /U /BX
    XXCOPY  \src\  \dst\   /A  /S /H /KS

    Note: the second step here uses /U (selects files that are
    present in the reference directory) and  /BX (exclude files
    with the same file date).

  Caution:

    The /CLONE, /Z, and /ZY switch performs deletion of extra
    directories and files in the destination.  If you inadvertently
    specify a wrong destination, the consequence will be very
    severe.  Some careless users have lost many files by this!!!


This page will remain forever under construction...



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #12



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: The file removal features in XXCOPY
Date:    2000-11-17  (revised)
====================================================================

Why are we always short in the storage space?

  No matter how big your hard disk is, it gets full sooner or later.
  Microsoft is often blamed for their "bloatware".  But, here is
  another theory.  There are just more programs which create files
  than those which delete files.  If you look at common applications,
  usually they offer more ways to create files than to destroy them.
  Therefore, to maintain a healthy equilibrium between the file
  creation and the file deletion, we need to put more conscious
  effort in file removal.  In the case of XXCOPY, it has been used
  primarily for file copying, and not much for file removal.

  Now, starting with Version 2.25, XXCOPY has a whole new set of
  file removal features.


File removal using a file copy utility?

  Why are we adding to XXCOPY more features which are not directly
  related to the file-copy function?  A good question.  Why not
  produce a separate file-delete utility?  That makes sense if you
  expect a simple one.  But, for that matter, you already have
  DELTREE from Microsoft.  Again, XXCOPY starts where Microsoft's
  imagination ends.

  Once you learn XXCOPY's rich set of file selection scheme in
  various file copy operations, you would want the same kind of
  power in file removal operations as well.  Therefore, instead of
  making a very similar program for file deletion, it is more
  natural to use the exact same file selection mechanisms of
  XXCOPY for file removal operations.  The notion of a file copy
  utility with a patch to handle file deletion should be thrown
  away.   It is only in its name, XXCOPY, which may mislead you on
  what it is capable of.  It is now a general purpose file management
  tool and the file removal feature is certainly an important one.
  In totality, we believe that you will spend less time learning the
  new features in the enhanced XXCOPY utility than you would spend
  in studying a brand new file delete tool.


The design principle of XXCOPY's file removal.

  We added just a few file removal functions which combine well with
  existing framework of XXCOPY's file selection schemes.  The new
  file removal functions all start with the letter R (for removal).

   Switch   Mnemonic          Files to be removed
   ------------------------------------------------------------------
    /RC   Remove-after-Copy   files in source after a successful copy
    /RS   Remove-Source       files in source which qualify
    /RD   Remove-Destination  files which qualify to be overwritten
    /RX   Remove-Extra        files which do not exist in the source

    (More minor variations are specified by optional third letter).

  Any of the above switches modifies the basic operation from file-
  copy to file-removal.  But, most other switches which engage in
  the file selection process apply equally to the file removal case.


The actions by the four variations in the file removal.

  With the first two variations (/RC and /RS), the file removal takes
  place in the source directory whereas in the last two cases (/RD
  and /RX), the operation takes place in the destination directory.

  The file copy operation is performed only with the first variation
  (/RC) and no copy is performed by the other three (/RS, /RD, /RX).
  Therefore, the designation of the source and destination for the
  command arguments (the non-switch parameters, ones without a slash)
  is admittedly weak.  But, in light of their origin being the file
  copy operation, they still carry some nuances.  The reference
  (destination) directory plays a vital role in file selection.


  /RC  (Remove-after-Copy)

        This switch first performs a regular file copy operation,
        and then removes the source file when the copy is successful.
        In essence, it is a file move operation.  Nearly all common
        XXCOPY switches designed for file copy apply in this case.

  /RS  (Remove-Source)

        This switch removes the source file without a copy action.
        In some cases, you specify only the first argument
        (the source specifier) without the destination.  However,
        there are many instances where you select files based on
        the relationships to the files in the reference (destination)
        directory.  For example, you may delete the files in the
        source that are older than the one in the destination.  You
        will probably use this switch more often than the other
        switches in this group.

  /RD  (Remove-Destination)

        This switch removes the files which would normally be
        overwritten.  The file selection process is exactly the
        same as in the cases of file copy.

  /RX  (Remove-Extra)

        This switch removes the files in the destination whose
        corresponding file is not present in the source directory.
        This command is somewhat similar to the /Z switch which
        accompanies regular file copy operations.  The difference
        with the /Z and /ZY commands is, of course, these commands
        carry out file copy actions whereas /RX does not copy at all.


The cases with /RD and RX --- Cautions.

        When you use the /RD or /RX switch, there are a few things
        you should remember.  Although the focus of the action is
        on the files which are to be removed, when these files are
        in the destination, many of the XXCOPY switch parameters
        does not work with the files in the destination directory.

        For example, when you specify /RD (remove destination) with
        /DB#4 (files more than 5 days old), the file date in the source
        is checked, not the one that would actually get removed.  This
        is because the /RD switch borrows XXCOPY's basic file-selection
        mechanism to determine which source-destination file pair
        to operate on.  This particular operation happens to be to
        remove the file in the destination rather than the one in
        the source.  It may be a little confusing but we can't help.

        It may be even more true with the /RX switches where the
        files are removed simply by the virtue of being in the
        destination as extra.  In this case, your additional switches
        such as /A (files with Archive bit set), /DB#4 (older than
        four days), or even /DA (when the file in destination is
        older than in the one in the source).  Remember, with the
        /RX switch, the files to be removed has no counterpart in
        the source!!!  So, all these switches will be just ignored.

        Our recommendation is that you should use the /RD and /RX
        switches for relatively simple file selection cases only.
        When you start adding many file selection switches, we advise
        you rewrite the XXCOPY /RD command using /RS/U with the source
        and destination reversed.  Similarly, an XXCOPY /RX command
        can be written using /RS/BB with source and destination
        reversed.  By having the files for removal in the source
        side in the command, you will have all the switches which
        applies to the files which would actually be removed.


Convenient shortcut:

  /RMDIR  Removes the specified directory including the files and
          subdirectories inside.

  This /RMDIR switch makes XXCOPY to behave like Microsoft's
  DELTREE utility.  The following two commands are very similar.

    DELTREE c:\mydir

    XXCOPY  c:\mydir  /RMDIR

  However, the power of XXCOPY become evident when it is combined
  with other switches.

    XXCOPY  c:\mydir  /RMDIR /DA:2000-04-01 /Y /X*.doc

      This command removes files inside the directory which are made
      on or after the specified date but avoids deleting .DOC files.


Examples of the file removal switches.

  xxcopy c:\mydir\myfiles.*  c:\destination\  /RC

    The files which match the pattern, "myfile.*" in c:\mydir\ and
    all of its subdirectories will be deleted after copying.  If
    copy fails for any reason, the files in the source will *NOT*
    be removed.  It behaves essentially like the MOVE command.


  xxcopy c:\mydir\myfiles.*  /RS /S /H

    It is similar to DELTREE, subdirectories are specified.  The
    files which match the pattern, "myfiles.*" in c:\mydir\ and all of
    its subdirectories will be deleted.  No copying will take place.
    The /H switch is needed if you want to include hidden and/or
    system files.


  xxcopy c:\mydir\myfiles.*  c:\reference\   /RS /S /H /DB

    The /DB switch uses the second directory (c:\reference) which
    supplies the filenames to compare the file time against the
    files in the source.  The files in the source which are made
    before (/DB stands for DATE:BEFORE) their counterpart in
    destination will be removed.  In this case, the files that
    do not exist in the reference directory will also be removed.


  xxcopy c:\mydir\myfiles.*  c:\reference\   /RS /S /H /DB /U

    This is exactly same as the one above except this has the
    /U switch (update --- applies only to files that exist in the
    destination) will not remove files that do not exist in
    the destination.  This is a quite useful combination to remove
    those files whose new version exists in the reference directory.


  xxcopy c:\mydir\myfiles.*      c:\reference\   /RS /S /H /U
  xxcopy c:\reference\myfiles.*  c:\mydir\       /RD /S /H /U
  xxcopy c:\reference\myfiles.*  c:\mydir\       /RD /S /H

    Here, three variations of file removal actions are specified.
    But, they achieve exactly the same result.  The first one
    removes the qualified files in the source (and its
    subdirectories) if they exist in the reference directory.
    Please note the change in the position of the c:\mydir
    argument in the second and third examples above.  In the
    second example, the /U is superfluous because the /RD switch
    (file in the destination that would be overwritten) implies
    that in order to be overwritten, its counterpart must exists
    in the source.  The third example proves that /U in the second
    example was not necessary.  On the other hand, /U must be
    in the first example; without it, the files in the reference
    directory will be totally ignored.


  xxcopy c:\reference\myfiles.*  c:\mydir\       /RX /H /S
  xxcopy c:\reference\           c:\mydir\       /RX /H /S

    These examples eliminate all files in the destination whose
    counterpart does not exist in the source directory will be
    removed.  They resembles the /Z switch where qualified files
    will be overwritten by the source files.


  xxcopy c:\mydir\myfiles.*  c:\destination\     /RS /H /S
  xxcopy c:\mydir\myfiles.*                      /RS /H /S


    These two will result in the same action, namely, removing
    the matched files in the source and its subdirectories.
    In the first example, since there is no switches which
    references the second directory specifier (c:\destination),
    the second argument was totally unnecessary and ignored
    (without warning).


  xxcopy c:\mydir\myfiles.*   /RS /S /H /DB#7

    Remove files which match the template in the source and
    its subdirectories which are more than seven days old.


  xxcopy c:\       /RS /S /H /DA:2000-02-01 /DB:2000-02-29


    Remove all files which were made during the month of
    February 2000.


  xxcopy c:\mydir\  c:\backup\   /RS /S /H /BI

    Remove files in c:\mydir\ and its subdirectories that are
    identical in date and size.


  xxcopy c:\mydir\               /RS /S /Ho

    Remove all hidden files in c:\mydir\ and its subdirectories.


  xxcopy c:\                    /RS /A

    Remove all files in the root directory with the archive bit set.


  xxcopy c:\mydir\*.jpg         /RS /Xmydear.jpg


    Remove all .JPG files but keep mydear.jpg.


Confirmation prompts.

  Since file removal is a serious business, XXCOPY always asks you
  for confirmation before removing a directory.  As a matter of fact,
  XXCOPY provides two levels of confirmation prompts.

  1.  On each directory to process.
  2.  On each file to delete.

  Of course, for batch file execution, you normally do not want such
  confirmation.  Also, to allow flexible control, the prompt includes
  a choice to eliminate further confirmation in the current and
  subsequent items.

  Unfortunately, the rules for the confirmation prompts are quite
  complicated because of the many cases involved.  You may skip the
  following three sections for now and come back to read the gory
  details later.  Just remember that you can suppress the Yes/No
  prompts in the two levels by /PD0 and /Y, respectively.


Directory-removal confirmation prompt.

  Before each directory to process, you will be given a chance to
  skip the directory by a prompt with

   (Y/N/A/R/S)?

   Y  for Yes (Yes, process the current directory for removal)
   N  for No  (No, skip the current directory and go to the next one)
   A  for Yes for All remaining directories (suppresses subsequent prompts)
   R  for Yes for the current and Remaining siblings and its subdirectories.
   S  for Yes for the current and its subdirectories.

  The Y(es) and N(o) inputs are the most obvious cases.  They apply
  to the current directory only.  The A(ll) input is also pretty easy
  to understand.  It applies the current and all subsequent cases by
  and suppresses the prompts once for all.  The R and S inputs are
  partial suppression and a bit confusing: When you type R, the current
  directory and remaining (sibling) directories will be removed without
  further prompting.  But, the effect of R response will not affect the
  parent directory level.  When you type S, it is the most restrictive
  response of all.  It affects the current and its subdirectories only.
  The next directory in the same level will not be affected by the R
  input.

  Here are how to suppress and unsuppress the directory-removal prompts.

    /PD   Enables the directory-level prompt.
    /PD0  Disables the directory-level prompt.


File-delete confirmation prompt.

  Another level of confirmation is on a file-by-file basis.  Before
  each file is to be deleted, you will be asked by a prompt with

   (Y/N/A)?

   Y  for Yes (Yes, delete this file)
   N  for No  (No, skip this file)
   A  for Yes for All remaining files (suppresses subsequent prompts)


  Here are how to suppress and unsuppress the file-delete prompts
  (applicable for /RS, /RD, and /RX cases).

    /Y   Disables the file-delete prompt.
    /-Y  Enables the file-delete prompt.
    /Y0  Enables the file-delete prompt (same as /-Y).


More confirmations on /RC (Remove-after-Copy).

  The /RC switch is a special case in the removal switch group.  It
  performs a file copy action before the source file is deleted.
  As with other file-copy functions, /P insert a confirmation prompt
  (Y/N/A)? to perform the copy operation first.  The regular rules
  for the /P switch applies exactly in the case /RC switch.  There is
  one more case of (Y/N/A)? prompt which may appear with the /RC
  operation --- file-overwrite confirmation.  Just like the regular
  file copy operation, when there is a file in the destination, you
  will be asked for confirmation.  The /Y, /-Y, and /Y0 for /RC switch
  control the suppression of the file-overwrite prompt rather than
  the delete-after-copy prompt.  Therefore, we need one more switch
  convention to enable/disable the file-delete confirmation prompt:

    /RC  (Remove-after-Copy) enables Y/N prompt on remove (same as /RCP)
    /RCP (Remove-after-Copy) enables Y/N prompt on remove
    /RCY (Remove-after-Copy) suppresses Y/N prompt on remove

    The optional third letter (P or Y) specifies the removal prompt.

  Similarly, the other variations in the file remove operation also
  accepts the third letter (to be symmetrical to the /RC switch).

    /RS  (Remove-Source)   enables Y/N prompt on remove (same as /RSP)
    /RSP (Remove-Source)   enables Y/N prompt on remove
    /RSY (Remove-Source)   suppresses Y/N prompt on remove

    /RD   (Remove-Dest)    enables Y/N prompt on remove (same as /RDP)
    /RDP  (Remove-Dest)    enables Y/N prompt on remove
    /RDY  (Remove-Dest)    suppresses Y/N prompt on remove

    /RX   (Remove-Extra)   enables Y/N prompt on remove (same as /RXP)
    /RXP  (Remove-Extra)   enables Y/N prompt on remove
    /RXY  (Remove-Extra)   suppresses Y/N prompt on remove

  The /Y and /-Y switches also control the prompt for file remove
  action for /RS, /RD and /RXn (not with /RC) switches.

  To undo any of the /RC, /RS, /RD, or /RX switches, append letter zero
  (e.g., /RC0, /RS0, /RD0, and /RX0 respectively).


Conclusion:

  The examples given here hopefully show that the file removal
  feature in XXCOPY is merely an extension to other XXCOPY switches
  and basically the same rules apply here.  In the case of file
  removal, probably less than a half of operations use the files
  in the second directory (destination) as a reference where the
  /RS switch is usually selected.  The next common cases involves
  in /RD which is used for elimination of multiple copies of the
  same files.  Although there are some switch combination which
  makes no sense with the file removal cases, many are expected
  to be quite useful.  Since not all of the switch combinations
  are thoroughly tested, there may be some contradictory definition
  of rules (or even actions) may arise during the beta testing.

  If you find an interesting switch combination which is quite
  unique and valuable in common cases, please let us know.  it
  seems that this scheme generates a very large number of
  combinations many of which are not intuitive.  It is entirely
  possible that someone may come across an interesting behavior
  which none else has ever thought of.  Only time can tell.



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #13



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: XXCOPY Frequent Asked Questions (FAQ)
Date:    2001-09-01
====================================================================
 
Q0:  Can I do xxxxxxxxxxx with XXCOPY?
     (Fill in xxxxxxxxxxx with your own words)

A0:  The most likely answer to the question is YES.  XXCOPY can do
     most common file management jobs quite nicely.  But, as the
     number of the XXCOPY switches grows, it is getting harder and
     harder to find the right command line argument for a given job.
     The recent addition of a few technical bulletins should help.

       for Command Line Syntax                          XXTB #25
       for Command Reference Alphabetic Listing         XXTB #26
       for Command Reference Functional Classification  XXTB #27
       for The Wild-Wild-Source Specifier               XXTB #28

     Especially, the Functional Classification article, XXTB #27
     seems to be the easiest way to see the overall picture.

     If your company has an urgent need for a file management job whose
     requirements are mostly met by XXCOPY but not exactly, and you wish
     to have an XXCOPY with a minor customization, please consult us.
     We may provide solutions to your need at reasonable time/price.

 
Q1:  What is the difference between XXCOPY, XCOPY, and other similar
     programs.

A1:  Let us list the utility programs which are related one another.

       XXCOPY.EXE   The logical extension to XCOPY - most powerful.
       XCOPY.EXE    Microsoft's command-line based copy utility
       COPY         Internal command to COMMAND.COM (Microsoft)
       XCOPY32.EXE  XCOPY's Win-32 program which XCOPY runs when
                    invoked inside Win9x/ME/NT/2K.
       XXCOPY16.EXE XXCOPY's predecessor. written for 16-bit (real mode)
                    environments such as DOS.  Supports most but not
                    all of XXCOPY's switches.
       ROBOCOPY.EXE Microsoft's version of an extended XCOPY utility.
                    It is bundled in Windows NT/2000/XP Resource Kit.
                    ROBOCOPY runs on WinNT or Win2000, not DOS nor Win9X. 
       DCOPY32.EXE  Essentially the same as XXCOPY.EXE.  It is bundled
                    with Pixelab's DATMAN-99 tape control software.
       DCOPY.EXE    Essentially the same as XXCOPY16.EXE.  It is bundled
                    with Pixelab's DATMAN-DOS tape control software.

     In short, XXCOPY and XXCOPY16 are Pixelab's products which
     extend the features of XCOPY32 and XCOPY respectively.

 
Q2:  I need to copy the top level of a directory structure only.
     I want to copy the user home directory structure from one server
     to another without copying any sub dirs or files.  I have tried
     the /T switch but it seems to copy the sub dirs.

A2:  Among all switches, the feature to go deep into subdirectories
     is controlled by /S (for subdirectory) and /E (for subdirectory-
     even-if-it's-empty).  Therefore, if you don't use /S or /E in
     the switches, it's OK.  However, these switches are also
     incorporated in a few other combined switches such as /BU
     (equivalent to /R/I/BI/Q/C/H/E/V/Y) and /CLONE (equivalent to
     /KS/H/E/R/Q/Y/BI/ZY) which makes it tricky.

     The easiest way to avoid the inclusion of /S or /E in such hidden
     cases is to explicitly cancel such hidden inclusion by adding
     /S0 the end of your switches.  That is, you can combine with any
     switches and put the /S0 switch to the right which will be
     evaluated last and therefore override any earlier inclusion.

        XXCOPY c:\mysource  c:\mydest  /CLONE  /S0

 
Q3:  I want to clone source to destination but only files with certain
     extension(s). When I use    XXCOPY c:\src\*.ext d:\dest /CLONE
     it also deletes files with different extension at destination.
     I cannot figure out which switches to use.

A3:  As explained in A2 above, the /CLONE switch is a shortcut for a
     combination of switches.  In this particular case, the /ZY switch
     is responsible for the file deletion.  As the name implies,
     the CLONE operation is to create a destination directory which
     resembles to the source directory as closely as possible.  That
     includes the removal of extra directory and files that should not
     be there.  So, to retain all the component switches of /CLONE
     except the /ZY part, just add the cancelling switch (/Z0) to the
     right hand side.  That is  /CLONE /Z0  will do the job.
     
     When you glance over the set of switches that are supported by
     XXCOPY, you will find a cancelling switch for nearly every switch
     (which usually ends with a zero (0) at the end).  The cancelling
     switches are convenient to reverse the effect of a long combination
     of switches which has been set earlier (to the left hand side).
     
 
Q4:  When I use the Win9x boot diskette, I cannot use XXCOPY since
     it is the 16-bit (essentially a DOS) environment.  Although I
     can use XXCOPY16, it does not use any long filename.  How can
     I copy directories in DOS (real mode) and restore long names.

A4:  It is true that there is no one-step solution to deal with the
     long filename.  But, this is what we recommend.

     1. Copy files using any of the 16-bit utilities you have.
        This will give you many files and directories with funny
        names (e.g., \PROGRA~1).  That is fine as the fist step.

        We suggest the use of XXCOPY16, simply because it is the
        most versatile utility with lots of options.  If you want to
        include hidden files and also to preserve file attributes,
        we suggest XXCOPY16.

          XXCOPY16  c:\mydir  d:\mydir /KS /H /E /R

     2. Once you are in Win32 (Win9x/ME/NT/2K), run XXCOPY with the
        special file renaming switch as follows

          XXCOPY  c:\mydir  d:\mydir  /NL /E

        In most cases, you probably want to add the /E switch to
        handle all files and subdirectories inside.

 
Q5:  When I use the /RS switch to delete a directory, it always shows
     a prompt "Dir (Y/N/A/R/S)?  How can I get rid of the prompt inside
     a batch file.  Also, what are the meaning of the prompt?

A5:  The Remove switch group has additional level of confirmation
     prompt due to the deadly consequences.  The prompt is controlled
     by the /PD (Prompt-on-Directory) and /PD0 (No Prompt-on-Directory)
     switches.  It appears before a directory is to be processed.

     Rather than having All-or-Nothing control, it provide the R and S
     responses which gives you Partial-Yes options.

     (Y/N/A/R/S)?

     Y  for Yes (Yes, process the current directory for removal)
     N  for No  (No, skip the current directory and go to the next one)
     A  for Yes for All remaining directories (suppresses subsequent prompts)
     R  for Yes for the current and Remaining siblings and its subdirectories.
     S  for Yes for the current and its subdirectories.

 
Q6:  I try to run a server backup using XXCOPY's incremental backup
     switch (/BI).  It works well with local drives.  But when I
     try /BI from one volume to another, sometimes nearly half of the
     files always get copied even though I know most of them have never
     been changed since the last backup.  Why /BI does not work on
     some volume?

A6:  Add the /FF (Fuzzy Filetime) switch in such cases.  With the
     switch, XXCOPY considers two timestamps the same if they are
     within a pre-determined number of seconds (/FF is the same
     as /FF2 --- for plus/minus 2 seconds).  In most cases, the
     default setting of plus/minus 2 seconds works well.

     Here is why...

     The /BI operation compares the file size and time stamp between
     the file in the source directory and in the destination.  Due to
     different file time format used in various file systems, the time
     stamp on a file gets truncated, resulting in a different file time
     after a copy.  When such files are compared against their
     counterparts in the source directory, the file times do not match.
     This is most commonly experienced when you copy files from an
     NTFS volume to FAT (both FAT16 and FAT32) volume.  Similarly,
     FAT and Unix/Linux file system has file date incompatibilities.

        File system    Time Resolution (Granularity)
       ----------------------------------------------
           FAT12             2 sec
           FAT16             2 sec
           FAT32             2 sec
           NTFS              100 nsec
           Unix/Linux        1 sec

     Whenever you run XXCOPY operation which involves a file date
     comparison (e.g., /BI, /BX) across different file systems,
     use the /FF switch.  

     The new /FF switch supercedes /FT and /FR which were /FF's
     prececessors.

 
Q7:  Is there a way to perform an incremental backup but ignore the
     file time.  That is, I want to select files of different size.

A7:  Yes, the /BZ switch is for you.  You can choose a backup scheme
     from the following variations.

      /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  Backs up different-size files (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)

      /U   Updates the files that already exist in destination.

      Note:  The /Bx switches are mutually exclusive one another,
             but /U may coexist with a /Bx switch.

 
Q8:  I have seen variations for the home page URL of XXCOPY.
     Which is the real home page?

A8:  The current official home page URL for XXCOPY is

        http://www.xxcopy.com/

     Our corporate home page is
     
        http://www.pixelab.com/

     Now, all of the freeware download files are stored at the
     following directory:
     
        http://www.pixelab.com/download/
     
     In the past, we have also used the following addresses  

        http://www.xxcopy.com/xxcopy/
        http://www.datman.com/xxcopy/

     Now, we encourage you to use the shorter form.


     * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

     We also run a beta test for which we estabished a full web site:
     
        http://www.xxcopy.com/betatest/

     If you are looking for a feature which is not supported by the
     current release version, you may try the beta test site.  The
     documentation files in the batatest site reflect the extended
     functionality of the beta version.

     Usually, a beta test version is well debugged.  But, of course, 
     it is less mature than the current release version.  Since we
     pay close attention to bugs and we try to correct serious
     problems as soon as they are discovered, you may estimate the
     stability of a particular beta test version by the date it was
     created.  If you feel uneasy to run an "untested" version, wait
     a few weeks.  If the same beta test version is still there,
     it will have gone through the scrutiny that much longer.

 
Q9:  I can't back up the Program File directory using XXCOPY.  Why?

A9:  It is very likely that you are not using quotation marks around
     the source directory name.  XXCOPY processes the command line by
     splitting the string of command line text into pieces using the
     space (or tab) character as the delimiter which separates the
     line into components.  When you have a multi-word name such as
     "Program Files",  XXCOPY will see it as two components.  You
     must tell XXCOPY that the two words are actually just one piece
     by surrounding the directory name using the double quotes (").

       XXCOPY c:\Progam Files     d:\dest\      // WRONG!!!

       XXCOPY "C:\Program Files"  d:\dest\      // CORRECT

     This is not XXCOPY's idiosyncrasies.  You can apply this technique
     to any operation in a DOS Box.  E.g., try it with DIR, CD, etc.

       DIR  "C:\Program Files"
       CD   "C:\My Documents\My Pictures"

 
Q10: I can't make the /Fo, /ON and even /OA to work.  Here's my command
     line looks like.  What is wrong?

        XXCOPY  c:\mysrc\  c:\mydest\  /s  /Fo c:\temp\mybackup.log

A10: This is a quite common problem with first time users.  As stated
     in the previous answer (A8), the space (and tab) character plays
     a very important role in the command line.  Although it may seem
     hard to read, any parameter for an XXCOPY command switch (such
     as /Fo which needs the filename) must follow the command switch
     immediately without a space character.  So, in your case, type

        /Foc:\temp\mybackup.log    (without space after /Fo)

     Although there are many command-line programs which permit or
     even require a space between the command switch and its parameter,
     XXCOPY is one of those programs that does not allow a space there.
     Actually, allowing an optional space between the command letter(s)
     (such as /Fo) and its parameter would create undesirable ambiguity
     in the command line syntax, it is best to keep it strict, albeit
     a bit ugly to read without a space there.

 
Q11: My log list which is created by either /ON or /OA does not
     include the list of files just copied.  How can I list the
     files which are successfully copied in the log file?


A11: The /ON/OA output was meant to be for error logging.  When
     you make a big backup job and save a log file, the few lines
     of error will be buried in the huge list of filenames.  Therefore,
     it is a deliberate XXCOPY design not to dilute the log file
     with voluminous success cases.  If you want a list of backup log
     that contains the names of the files which are copied, use the
     /Fo switch which is equivalent to the console output you get
     using the /F switch.

 
Q12:  But, /Fo always overwrites the existing list file.  Is there
     a switch which allows me to append the list to an existing
     list file?

A12:  No, there is no Append equivalent in the /Fo switch.  But, you
     can write the following sequence in your batch file to achieve
     the same goal.

         ...
         xxcopy  \src\ \dst\ /fonew.lst
         type    new.lst >> grand.lst
         ...

 
Q13: When I run a backup using XXCOPY (XXCOPY src dst  /CLONE), on
     some file, I get a "data mismatch" error message.  What does it
     mean?

A13: Immediately a file is copied, XXCOPY checks the size of the newly
     created file in the destination directory.  If the file size does
     not match the source, the error message will be shown.  Under
     normal circumstance, this should not happen.  But, in a multi-
     tasking environment such as Windows, a file which was just
     closed may be subjected to a modification by another process which
     is not necessarily a fatal condition.  XXCOPY does not interpret
     the severity of such an incident.  Therefore, it is up to you to
     make the assessment as to the purpose of the file.  In many cases,
     the error condition is not  very serious.  Otherwise, you may turn
     off *ALL* processes except XXCOPY when you clone the current volume
     to another volume.

 
Q14: I want to obtain a list of files using XXCOPY's rich set of file
     selection mechanism but without acutally causing any actions like
     copying or removing files --- just a listing only.  Also, I want
     just a bare listing without even the file size info.

A14: XXCOPY is no longer just a file copy utility, but a general purpose
     file management tool and searching and making a list of files is one
     of the jobs XXCOPY is well equipped.  I will show you a few examples
     as the answer

     XXCOPY  c:\mydir\*.jpg  /S /L

         The searchspec has the base directory part and a template part.
         /S is to include subdirectories (which usually the case)
         The /L switch is the starting point.  It shows file size.

     XXCOPY  c:\mydir\*.jpg   /S /L /ZS

         /ZS  without the sign-on and statistics info.  The bare list.

     XXCOPY  c:\mydir\*.jpg   /S /LL /ZS

         /LL  gives you longname only

     Actually, /Lxxxx is a general purpose list-formatter.  You can add
         L(ongname), S(hortname), Z(size), D(ate), T(ime), A(ttributes).
         Since Longname varies in length, for best list, place L last.

     Some more variations:

     XXCOPY  c:\mydir\*.jpg  /S /ZS /LD      // D(ate) L(ongname)
     XXCOPY  c:\mydir\*.jpg  /S /ZS /LDZL    // D(ate) S(ize) L(ongname)
     XXCOPY  c:\      /DA#0  /S /ZS /LDZL    // Only the files made today

 
Q15: When I use XXCOPY16 in DOS and duplicate the entire C: drive to D:
     using the following command, I get funny filenames in the destination
     like XXXXXX~1.XXX.

       XXCOPY16  C:\  D:\  /CLONE

     How come the files are not copied correctly?

A15: Although XXCOPY16.EXE supports almost all XXCOPY.EXE command switches,
     the longname related features (such as the handling of files using
     the long filename) cannot be supported.  The limitation is not of
     the XXCOPY16 program.  It is the real mode (DOS) environment which
     does not support the long filenames.  This is exactly why Microsoft
     invented the "alias" 8.3 filename in order for legacy (DOS) programs
     to be able to access files created under Win9x and NT/2000/XP with a
     long filename.  For more information about duplicating a disk drive
     under Win9x, there is another article on the subject with great detail
     XXTB #10.

 
Q16: I understand XXCOPY can duplicate the system disk for Win9x/ME.
     What about the WinNT or Win2000?

A16: No.  Not at this moment.  We have not come up with a sure way to
     make a bootable WinNT or Win2000 disk using XXCOPY and standard
     set of tools.  We have been asked by many users why not.

     Let me briefly explain what is involved in making a bootable disk. 
     The initial step in booting a Windows system is to have BIOS access
     the Master Boot Record (MBR, the first sector of the first drive),
     which determines the partition information and supplies the initial
     bootstrap program.  This very small program is then copied into the
     main memory and the processor will start executing the program.
     Normally, the MBR data is initialized by FDISK (or other specialized
     toos).  XXCOPY does not access the MBR.  That is why in the article,
     we show you when and how to use FDISK.  In the case of WinNT/2000/XP,
     the lengthy OS installation procedure writes the MBR with its own
     boot program.  So, the MBR certainly is one factor.
      
     Secondly, a handful of key files (such as \WinNT\system32\security) 
     are locked by the system while WinNT/2000/XP is running.  Since the
     system refuses to share these files with any other application,
     XXCOPY can never access these files (about a dozen or so). In the
     case of Win9x, most system files in the \Windows directory are
     accessible in read mode, and XXCOPY has no problem accessing nearly
     all of them from a Win9x session.  It is entirely possible that one
     can write an elaborate multi-step batch script to access those key
     files from DOS.  We just have not done our homework on this subject.

 
Q17: Is there a way to backup a directory and keep the time-stamp of
     the source directory (and those of the subdirectories) so that
     when I restore the directory later, the time-stamps will exhibit
     the original directory-creation time?

A17: If you run XXCOPY under NT/2000/XP, newly created directories in
     the destinaion will get the same timestamp.  But, under Win9x/ME,
     unfortunately no.  As far as we know, there is no File I/O API
     in the Win9x programming (or in DOS for that matter) which allows
     a program (such as XXCOPY) to set or modify the time value for
     a directory.  We feel it is a serious omission of in the Win32
     implementation.  The only ways to achieve the objective are to use
     some programming tricks.  But, possible side effects and risk of
     compromising the system integrity is too great.  It is a serious
     omission in API functionality when Microsoft implemented Win32
     for the Win9x/ME environment. 

 
Q18: When I right-click the icon of the XXCOPY.EXE file and examine
     the version number, it is different from the one the program
     shows at the banner line.  Why?  And, which one to believe?

A18: We have traditionally used version numbers which consist of
     four digits which are grouped in to three parts like 2.60.0.
     Unfortunately, the version information which can be attached
     to an EXE file (to be viewed in the property sheet of the
     EXE file) has a format of four digits which are always split
     into four parts of single digit.  We don't really like the
     format and we can't do anything about it.

     Besides, it is somewhat time consuming to set the property sheet
     version number every time we build a beta version (which are
     often made for tentative debugging purposes).  To be honest,
     more often than not, we forget spending time in adjusting the
     property sheet section while we are concentrating on removing
     bugs and making a few experiments to see a particular problem
     is gone for a user's environment.  The property sheet is just
     a distraction as far as we are concerned. 
     
     Just disregard the version number property sheet and take
     XXCOPY's banner line (which are very prominent) at its face
     value.



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #14



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: Tutorials in Command Line (DOS Box) Operations
Date:    2001-09-02
====================================================================

One of the common problems in providing a command line tool like
XXCOPY is that many computer users now do not feel comfortable with
non-GUI operation.  They prefer the comfort of drag-and-drop and
mouse clicks.  While the GUI operation is certainly more intuitive
and quicker to learn, it is not the fastest way to get job done
when the job is to handle several thousand files in hundreds of
directories.  And, that's what you have now in your humble disk!!!

We see no substitutes for command line processing especially with
batch file programming (or other scripting techniques) to automate
it.  Once you have set up a well-written script with XXCOPY commands
inside, you can make an icon for it and you will then enjoy the
comfort of clicking the icon, sit back and relax while XXCOPY is
doing the hard work.

You should at least give yourself a chance to acquire the basic
skill of exploiting the power of your computer (and it will remain
with you for the rest of your life).  The basic DOS-box skill helps
you not just for XXCOPY.  Moreover, the command line operation will
probably be there for many more generations of operating systems
(Win9x, NT/2000/XP/XP, and beyond).

The following list is a non-exhaustive collection of pointers to
tutorials in command line (DOS) operations. 

=================================================================


1. http://home.att.net/~gobruen/progs/dos_batch/dos_intro.html

       4-page series.  Step by step.  Good narrative tutorial.


2. http://www3.sympatico.ca/rhwatson/dos7/commandintro.html

       Good as a reference, each command is explained with
       a dedicated page with examples.


3.  http://teckies.com/tutor/dos/

       A very good site.  It is shorter than the earlier one.


4. http://www.animatedsoftware.com/faqs/learndos.htm#cd_command

       This site is shorter.  Therefore, if you are in a hurry,
       this page may be good.  But, less text per command and
       that may possibly make this page harder to learn.


5.  http://www.glue.umd.edu/~nsw/ench250/dostutor.htm

       Six lessons.  The page is text-only.  Looks good.


6.  http://cs.senecac.on.ca/~ops134/resources/commandline1.htm

       Shortest of all.


===============================================================

If you have seen good sites which are not listed here, please
let us know for future inclusion in this list.




© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #15



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: Windows File Date and Time
Date:    2000-06-07
====================================================================

File time in DOS

  The good old DOS had just one file date value which keeps track of
  a file in your storage (hard disk and floppy).  To be precise, the
  value has two parts, the date part (year, month, and day) and the
  time part (hour, minute, second ---- measured in two second interval),
  but we will call it just "file date" in this discussion.

  Whenever a file is created, the current system time is stamped to the
  file which would remain constant even if it is copied or moved to a
  new directory.  A complete rewrite, partial rewrite, or partial
  deletion would update the file date value.  Therefore, the DOS file
  date represents the last-write (or, last-modified) time.  It was
  quite simple and well.


File time in Win32:

  The new so-called Win32 environments (Windows 95, 98, NT, 2000)
  expanded the file date to hold more information about the history of
  the file.  Win32 maintains three distinct time stamps on every file.
  Inside Windows Explorer, you can examine these values in the property
  sheet for a file.

    1. Created:    It is the time when the file is created in the
                   current directory.  When the file is copied to a
                   new directory, a new value will be set.

    2. Modified:   It is the time when the file is last modified.
                   When the file is copied to elsewhere, the same
                   value will be carried over to the new directory.

    3. Accessed:   It is the time when the file is last accessed.
                   This value is set by the application program that
                   sets or revises the value.  Unfortunately some
                   applications do not revise this value.

  The file date value commonly referred to under Win32 is the "Last-
  modified" value (2nd one in the list above) whose behavior is
  consistent to the DOS file date value.  The Win32 file date values
  are stored in much finer resolution than the DOS time stamp (16 bits
  for the date and 16 bits for time).   The Win32 file date value
  is a 64-bit quantity which represents the time elapsed from
  January 1, 1601 (the first date of the current quadri-century)
  in 100 nsec granularity.  For the compatibility's sake, even WinNT/2K
  uses the same 2-second granularity for the "Last-modified" time for
  FAT-based file system (does not apply for NTFS files).


XXCOPY's file date treatments:

  XXCOPY provides the following switches to select one of the
  three timestamps as the filedate value for time comparison.

     /FC     File-Create time
     /FW     Last-Modify (Last-Write) time (default)
     /FA     Last-Access time

  These switches do not perform any action by themselves.  They
  are used to modify the semantics of other switches which use
  the file date parameters in the file selection process.  For
  example, /DA and /DB are often modified by the /FC switch.


The file date (Last-Modify date):

  The common file date value (more precisely, the Last-Modify-date)
  is the most intuitive and probably the easiest to use.  So, by
  default, XXCOPY's file date functions use the Last-Modify date by
  default.  For example,

    XXCOPY  c:\mydir\  d:\backup\  /DA#7

  The /DA#7 switch selects files which are last modified within
  the last 7 days.  This selection includes files which are created
  or modified elsewhere and brought to the source directory by
  either a copy or move operation.  The COPY or MOVE operations
  carried out by practically all file copy utilities (i.e.,
  Drag-and-drop, COPY, XCOPY, MOVE, or XXCOPY) preserve the file's
  Last-Modify date.


The file creation date (File-Create date):

  Another useful date value is the File-Create date.  Unlike the
  Last-Modify date, this value represents the date the particular
  copy of the file is created in the directory.  Here, the meaning
  of creation includes both the case of a newly created file, and an
  existing file brought in to the directory by a copy operation.
  So, the File-Create date is often newer than the Last-Modify date.
  Note that sometimes, the "File-Create" date could be a little
  misleading.  But, in this article we use the "File-Create" date
  consistent with the way Microsoft calls it.

  With XXCOPY, you may use this creation-date value instead of the
  more common Last-Modify date.  Here is an example:

    XXCOPY  c:\mydir\  d:\backup\  /S /FC /DA:.

      This command copies all the files which are either made in
      or brought into their present directory today regardless of
      the age of the file.  With the /FC switch, XXCOPY uses the
      File-Create date rather than the Last-Modify date.  The
      /DA:. switch selects files of today or a future date.

  Since the use of the File-Create date has serious problems, we
  generally discourage the use if this date


Problems with the file creation date (File-Create date),

  The problems of the File-Create date can be traced back to
  the inconsistency in Microsoft's various file management
  utilities.  It seems that the purpose of three distinct
  variations in the file date values were never clearly defined
  by the designer of the feature.  We as software developers
  have not come across any official documents on this subject.
  So, we conduct a few experiments using Microsoft's programs
  which are part of Windows 95.  Then, you will find many
  inconsistent usages in the File-Create date.

  Observation 1:  When you perform a copy operation of a file
                  which results in a new physical copy in the
                  destination, the File-Create date is set to
                  the current date.

  Observation 2:  When you move a file within a volume, the
                  operation is translated to the more efficient
                  renaming operation.  Since renaming a file does
                  not involve in a newly created file, the File-
                  Create date will not be updated.

  Observation 3:  When you move a file across the volume boundary
                  (e.g., from C: to D:), the move operation is
                  carried out as a file copy action followed by
                  a file delete action, the file in the new
                  location will receive a new File-Create date.

  Observation 4:  Edit a file using either NotePad.exe, WordPad.exe
                  or WinWord.exe (word), and save the file.  The
                  newly update file will have the same File-Create
                  date, but a new Last-Modify time.


  The inconsistencies listed above make the File-Create date unfit
  for a general-purpose file selection criterion by XXCOPY.  On
  the other hand, if you have full control of the file creation
  process in a given directory (say, you always use one of the
  file copy operations to manage files in the directory), you may
  still use it with caution.


The case with the Last-Access date:

  This parameter is also a very controversial value that goes with
  every file in the Win32 system.  The Last-Access date is set whenever
  the file is "Accessed" by a program.  Then, the next question is
  what really constitutes an "Access" to a file?

  Is opening the file by a program, by any program, treated as an
  "Access"?  Thank God, the answer is no.  If that were the case,
  whenever the Windows Explorer displays an executable file using its
  icon (which is stored inside the file), the Last-Access date would
  be set to the current date.  That is because display of the icon
  involves fist opening the file and reading the contents to locate
  the internal icon.  In this case, although the treatment of the icon
  is rather elaborate under the cover, it is not regarded as an "Access".
  On the other hand with .EXE and .DLL files, executing the program
  constitute the Last-Access.  That makes sense.

  But, there are plenty of silly mistakes committed by Microsoft's
  programmers which makes the Last-Access date of little use.  The
  possibly the worst program mistake with this value is by Windows
  Explorer.

  As shown above, when you click the right button on an icon of a file
  and select the properties menu, you can examine the Last-Access date
  (in this case you get only the date without time) along with the other
  two file date values.  But, if you are alert, you will notice that
  the Last-Access date is always today's date.  Yes, the very act of
  examining the Last-Access date value triggers the update of the value.
  That is sad.  Very sad.

  When a system administrator makes a regularly scheduled backup, he
  usually performs a full backup every so often, copying every file
  in a drive.  Now, that is an act of Access.  Copying a file will
  also update the Last-Access date.


Conclusion:

  If Microsoft's programmers had been very careful not updating the
  Last-Access values under certain common file access cases, this
  value could have become a very useful parameter in file selection
  for file management (backup) activities.  Unfortunately, they wrote
  so many programs that ignored the designer's apparent intention.
  Now, it is too late.  The Last-Access date is even more useless
  than the doomed File-Create date.

  We recommend the use of /FC (File-Create date) only in carefully
  controlled circumstances.  The Last-Access date (selected by /FA)
  seems nearly useless for meaningful file management activities.

  Original DOS file system had only 32 bytes to represent a file in
  the directory.  The very restrictive 8.3 filename and the limited
  granularity (2 second) in file date are corrected in the Win32
  file systems (VFAT).  But, the generous allocation of lots of
  bytes (24 bytes just to store the file date in three flavors) which
  bloats the system resource usage but provides little useful
  information seems to symbolize what we know as Windows Operating
  System.



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #16



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: Gathering files into one directory using XXCOPY
Date:    2000-09-14
====================================================================

The trouble is...

  Do you know approximately how many files there are on your disk?
  Many people don't have a faintest idea.  But, if you find the XXCOPY
  utility useful at all, you should check the numbers every now and then.
  By the way, in my own modest machine, the C: drive has approximately
  150,000 files in 8,000 directories totaling about 20 GB.

  At any rate, we all face the same headache; too many files in too
  many directories.  Finding a file now becomes a project.  We try
  hard to come up with a better tool in our losing battle.


Search and collect files into just one directory.

  In many cases, collecting certain files into a directory may save a
  lot of time.  For example, if you gather all Microsoft Word document
  (.DOC) files from the entire volume into just one subdirectory,
  browsing them and locating a particular file become much easier.
  That is what XXCOPY's /SX, /SG and their variations are for.

  The traditional way to do this is (don't type beyond the comment //... ),

     XCOPY  C:\*.doc  D:\mydocs\   /S       // using Microsoft's XCOPY
     XXCOPY C:\*.doc  D:\mydocs\   /S       // the same here with XXCOPY

       The /S switch makes the copy operation to recursively
       go inside subdirectories and copy all matching files.
       If subdirectories are not present in the destination,
       they will be created as needed.

       ----------------------------------------------------------
         Note that the destination directory was deliberately
         chosen in a different drive in the examples above.
         Watch out if the destination is in the same volume...

           XCOPY  C:\*.doc  C:\mydocs\   /S       // a FATAL error
           XXCOPY C:\*.doc  C:\mydocs\   /S /CCY

         This is a classic case of the cyclic copy situation which
         Microsoft's XCOPY cannot handle.  Using /CCY, our XXCOPY
         allows you to specify the destination in the same volume.
         See XXTB #07 for detail.
       ----------------------------------------------------------

     Although the files you wanted are all copied into the destination,
     the destination directory will inevitably have many subdirectories
     which makes your next step still very time-consuming.


XXCOPY provides better solutions.

  XXCOPY has a better way to deal with the situation that avoids making
  subdirectories in the destination.  Of course, it is inevitable that
  many files share the same filename.  So, XXCOPY synthesizes new
  names when duplicate files are to be copied into the destination.

     XXCOPY C:\*.doc  D:\mydocs\   /SX
     XXCOPY C:\*.doc  D:\mydocs\   /SG

  Our original directory-flattening functions (/SX, /SL and /SR) combine
  the source directory path (only the distinguishing part) with the
  source filename to form a long filename which is always unique
  (and you can tell where the files are from).

      /SL     Flattens subdirectories, add-name-Left
      /SX     Flattens subdirectories, add-name-Middle
      /SR     Flattens subdirectories, add-name-Right

  By popular demand by XXCOPY users, we re-engineered the new file-gathering
  functions /SG and its variations which retain the original filename.

      /SG     same as /SGN (newest one and sorted by newness)
      /SGN    sorted, newest file first
      /SGO    sorted, oldest file first
      /SGF    unsorted, first come first served

      /SGNO   picks the newest file
      /SGOO   picks the oldest file
      /SGFO   picks the first file encountered

  That's a total of nine flavors to choose from!  Our favorite is /SGN
  which got the honor of being equivalent to its shorter version, /SG.


The /SX (/SL or /SR) switch flattens a directory.

  To understand how these schemes work, it is easiest to actually
  run the command and take a look at the destination directory.
  Let us start with the directory-flattening functions.

    XXCOPY C:\*.doc  D:\mydocs\   /SX     // puts path in the middle

       The result would be

       D:\mydocs\MYFILE`My Documents`word`.DOC
       D:\mydocs\MYFILE`Junk`Vote2000`gore`.DOC
       D:\mydocs\MYFILE`Junk`Vote2000`bush`.DOC
       D:\mydocs\MYFILE`Junk`Vote1996`dole`.DOC
           ...

     The four MYFILE.DOC files are collected from four directories.
     In this case, the backslash (directory name delimiter) is converted
     into a legal character which is infrequently used in filenames
     (default = back-apostrophe (`)).  (See below to select the directory
     name delimiter character other than the default character).

     The /SL and /SR variations respectively place the pathname part
     either at the left or at the right of the filename.  We like the
     /SX version the best among the three variations because the new
     filename starts like the original and the ending also remains
     the same so the Windows knows which application to associate
     the file when you double click the file icon.


The /SG switch gathers files into a directory.

  All the file-gathering functions (/SG and its variations) work
  identically if there is only one file for a given filename.
  The switches with O (not zero, but Oh) at the end keep only one file
  Newest, Oldest, or the First one found) for a given filename.

  On the other hand, other /SG functions have to gather all files
  with the same filename into one directory.  Therefore, we need to
  synthesize the filenames for the duplicates.  XXCOPY simply adds
  a "middle name" to the filename.  For example,


     XXCOPY C:\*.doc  D:\mydocs\   /SG     // sort, newest file first

       The result would be

       D:\mydocs\MYFILE.DOC                // the newest file
       D:\mydocs\MYFILE.0001.DOC           // 2nd newest
       D:\mydocs\MYFILE.0002.DOC           // 3rd newest
       D:\mydocs\MYFILE.0003.DOC           // 4th newest
          ...


  These functions are fun to play with.
  For example, just see how many .JPG (image) files are on your system

      XXCOPY C:\*.jpg  C:\temp\   /SG /CCY

      You may be surprised how much space is tied up with them.
      This particular example may become your favorite tool to
      snoop your children's computer for questionable pictures!!!


Reversal of flattening = rebuilding the tree.

  With regard to the difference between /SX and /SG, for a casual and
  temporary usage, the /SG switch seems easier for most people.  The
  most important difference of the two approaches is that the /SX (and
  also /SL and /SR) switch synthesizes the new filename without losing
  the origin of the file.  As a matter of fact, XXCOPY provides the
  following three switches which allow you to rebuild the original
  directory structure from the destination (flattened) directory.

      /SLR   Rebuild the original directory from directory made by /SL
      /SXR   Rebuild the original directory from directory made by /SX
      /SRR   Rebuild the original directory from directory made by /SR

      Note that these switch must match the way the flattened directory
      was made.  For example if you flatten a directory using /SL, you
      must use /SLR and so on.  Also, the directory name delimiter
      character must be consistent between the flattening and the
      rebuilding steps.


      Examples:

           XXCOPY C:\word\*.doc  D:\mydocs\   /SX        // flattens
           XXCOPY D:\mydocs\     C:\word2\    /SXR       // rebuilds

         The ultimate destination directory (C:\word2\) would contain
         the same files and subdirectories as in the above two steps
         when you run the following command which copies the files
         to the destination directly.

           XXCOPY C:\word\*.doc  C:\word2\    /S


About the directory name delimiter character.

  The directory name delimiter can be any legal non-alphabetic,
  non-blank character.  The following line lists all such characters:

          !  #  $  %  &  '  (  )  -  .  @  ^  _  `  {  }  ~

      Since many of them are frequently used in common English usage
      and therefore likely to appear in filename, the choice for the
      default delimiter character (the back-apostrophe character `)
      was chosen.  The next good candidate is probably the caret symbol (^).
      The trouble here is that the character used as the substitute for
      the backslash character must be a legal character for a filename,
      therefore, it is inevitable that the chosen delimiter may already
      be a part of existing filename.  In such unfortunate cases, the
      directory name which would be rebuilt from the synthesized name
      would not be identical to the original path, a small inconvenience.


Final note.

  Lastly, let me remind you that gathering files into a directory
  is nice, but that contributes to yet more redundant files.  So, make
  sure that you remove all the files you collected for a temporary
  purpose as soon as you are done with them.  One way to deal with
  it is to always use the same one directory for temporary jobs.



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #17



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: Selecting files by file date amd time using XXCOPY
Date:    2001-02-23  (revised)
====================================================================

Introduction

  The filedate value offers yet another trait to select files for
  various file management operations.  Microsoft's XCOPY allows you
  to specify a cut-off date to select some recently created files.
  Our XXCOPY, on the other hand, seizes the opportunity with respect
  to the filedate (and time) to a much greater extent for qualifying
  files for a large collection of functions.

  While the fundamental elements of filedate-related operations are
  quite simple, the total number of variations may be daunting
  to some users.  So to ease the pain of memorizing the details,
  here in this article, simpler things are presented first, followed
  by more complicated aspects.


The file date/time related XXCOPY switches.

  The ten basic filetime switches fall into either of the two groups:

    Comparison to the reference file (newer/older/same/different)

        /DA,  /DB,  /DS,  /DX         ; newer, older, same, different

    Relative and Absolute date specifiers (you give the range of date)

        /DA#n,    /DB#n,    /DO#n     ; as how many days ago from today
        /DA:date, /DB:date, /DO:date  ; date specified as yyyy-mm-dd


Comparing the filetime of two files

  The filetime comparison switches are used mainly for directory
  synchronization and various backup operations based on file time.
  Therefore, in all cases, the file time comparison is made on a
  pair of files; one from the first (source) directory, and the other
  from the second (destination ,or sometimes reference) directory.

  In this case, the pair of files are compared not only by the
  filedate, but also by the file time to the finest value (hour,
  minute, and second) (see below for /FT for details).  Since the
  comparison is made on the file time value which are stored in
  the respective directory, the XXCOPY user does not specify the
  value and therefore, the command syntax for these switches are
  the simplest; /D, /DA, /DB, /DX, /DS without any user-specified
  parameter.

     /D   Same as /DA
     /DA  Copies newer files and brand new files.
     /DB  Copies older files and brand new files.
     /DX  Copies different-date files only.
     /DS  Copies same date/time files only.


Testing file's date against a user-specified date range

  Unlike the file time comparison method presented in the preceding
  section, XXCOPY allows you to select files based on the filedate
  associated with each file which are expressed in either the relative
  date (how many days ago from today), or the absolute date (specified
  in year, month and day).  For this feature, XXCOPY maintains one
  or two dates to qualify files for file management operations.

     "A-date value" for On-or-After date  (entered by /DA: or /DA#)
     "B-date value" for On-or-Before date (entered by /DB: or /DA#)


  The relative date specifiers

      System administrators often refer to a group of files by the age
      of the files for backup operations.  One of the most natural ways
      of specifying them is the file age measured in days (relative to
      the current date).

      /DA#<n>  Copies files that were changed on or after  <n> days ago.
      /DB#<n>  Copies files that were changed on or before <n> days ago.


      Examples of command lines using the relative date:

        XXCOPY  src  dst  /DA#60            // After 60 days ago
        XXCOPY  src  dst  /DB#30            // Before 30 days ago
        XXCOPY  src  dst  /DA#60  /DB#30    // files with age of 30-60 days
        XXCOPY  src  dst  /D#100            // same as /DA#100

      As you can see from the examples, you may specify only one of
      the "A-date value" and "B-date value" or both.  If you specify
      only one date value, then the other end is open-ended.

      Note that the file age is measured by the number of days starting
      0 (zero) as the value for files made today, 1 (one) for files made
      yesterday, and so on.

      When you specify both the "A-date value" and "B-date value", the
      date range you specify may be used for an inclusive selection or
      exclusive selection, depending on which of the two values are newer.
      The following examples illustrate this point more clearly.

        XXCOPY  src  dst  /DA#60  /DB#30    // files with age of 30-60 days
        XXCOPY  src  dst  /DB#60  /DA#30    // age >= 60 or age <= 30

        Here, two same date values are specified for the opposite
        /DA: and /DB: switches.  The first example is the most common
        case where the two dates specify the beginning and the end of
        a single period.  On the other hand, the second example shows
        different case where the two date are applied toward the
        opposite direction in the timeline which in effect excludes
        files in the excluded period (files with age 31-59 days are
        NOT selected) --- such a case is accepted as a valid command.

      Note that when the age is referred to by the number of days,
      it is not measured by the multiple of 24 hours.  Rather, the 0th day
      (today) began at midnight today to take care any fraction of today.
      That is, /DA#0 specifies the files made on or after midnight today.
      This scheme allows the cut-off time to be midnight of each day.


  The relative time specifiers

      The relative time specifier adds few more twists to the relative
      date specifier.  In the /DA#n  /DB#n or /DO#n switches, when the
      age value n is given as a number without a suffix, the age will
      be measured by number of the days.  This is probably most common
      usage.  But, you may add a single-letter suffix (D, H, M, or S)
      to the value (for Days, Hours, Minutes or Seconds, respectively).

      Examples:

        XXCOPY  src /S /LDT /DA#30M   // list files made within 30 min.
        XXCOPY  src dst /s  /DA#24H   // copy files made within 24 hours
        XXCOPY  src dst /s  /DA#0     // copy files made today (since midnight)


  The absolute date specifiers

      Since we reference dates by year, month and day quite often in
      our day-to-day lives, it is also very natural for us to specify
      the file time as such.

      /DA:<date> Copies files that were changed on or after the specified date.
      /DB:<date> Copies files that were changed on or before the specified date.


      Examples of command lines using the absolute date:

        XXCOPY  src  dst  /DA:2000-1-1
        XXCOPY  src  dst  /DB:1999-12-31
        XXCOPY  src  dst  /DA:1998-1-1 /DB:2000-8-31
        XXCOPY  src  dst  /D:1998-1-1              // same as /DA#1998-1-1


  Now, you already know the essential mechanism of XXCOPY which controls
  file selection based on the filedate.  Nearly all of the remaining
  discussion is for various shortcuts and clarifications of details.


The "O-date value" for the same parameter

  When the "A-date value" is the same as the "B-date value" (to specify
  a particular date), you may use the third way, the "O-date value" to
  combine the two into one parameter.
  You can use the "O-date value" (On the date) whenever the "A-date value"
  and the "B-date value" are the same.  (Here, the letter O (oh, not zero)
  is shown in lowercase (o) to avoid confusion.)

      The following two commands are equivalent:

        XXCOPY  src  dst  /DA:2000-5-1 /DB:2000-5-1
        XXCOPY  src  dst  /Do:2000-5-1

     It also applies to the relative date specifier.  The following
     two commands are equivalent.

     XXCOPY  src  dst  /DA#80 /DB#80
     XXCOPY  src  dst  /Do#80


Shortcut for Today and Yesterday

  One of the most common date used with XXCOPY is the current date
  (today) and one day earlier (yesterday).  So, we assign the dot (.)
  parameter as a shortcut for today's date for the /DA and /Do switches,
  and as a shortcut for yesterday's date for the /DB switch.

      /DB:. or /DB#.  specify filedate date is Yesterday or earlier.
      /DA:. or /DA#.  specify filedate that is today or later.
      /Do:. or /Do#.  specify filedate that is today only.


Partial date specifiers

  You may specify a month by omitting the day-of-the-month value.  If
  only two numbers are given, one must be a 4-digit year value.  The
  following command lines all specify the entire month of February, 2000.
  The "B-date value" in this context specifies the last day of the
  month, and the "O-date value" in this context specify the whole month.

     XXCOPY  src  dst  /DA:2000-2-1 /DB:2000-2-29
     XXCOPY  src  dst  /DA:2000-2   /DB:2000-2
     XXCOPY  src  dst  /Do:2000-2

  Similarly, you may specify the filedate by the year.
  The following three cases are equivalent.

     XXCOPY  src  dst  /DA:2000-1-1 /DB:2000-12-31
     XXCOPY  src  dst  /DA:2000     /DB:2000
     XXCOPY  src  dst  /Do:2000

  The partial date specifiers that are shown so far are for the cases
  of the whole month and the whole year.  But, the usage of partial date
  specifier is not limited to such cases.  When it is used for the
  /DA parameter, the partial date value specifies the first day of
  the month/year.  When it is used for the /DB parameter, it denotes
  the end of the month/year.  And, when it is used for the /Do
  parameter, it selects the whole month/year.  Here are some examples.

     XXCOPY  src  dst  /DA:1999-4           // same as /DA:1999-04-01
     XXCOPY  src  dst  /DA:1998             // same as /DB:1998-01-01

     XXCOPY  src  dst  /DB:2000-5           // same as /DB:2000-05-31
     XXCOPY  src  dst  /DB:1998             // same as /DB:1998-12-31

     XXCOPY  src  dst  /Do:2000-2           // the month of Feb, 2000
     XXCOPY  src  dst  /Do:2000             // the whole year 2000

     XXCOPY  src  dst  /DA:1998-4 /DB:1999  // /DA:1998-04-01 /DB:1999-12-31


Odd cases:

   The relative and absolute date specifiers can be mixed in a command.
   Although most users avoid mixing the two types of expressing the
   date value, there is nothing inherently wrong about using both the
   relative and absolute date specifiers.

       XXCOPY  src  dst  /DA:2000-1-1  /DB#7

       This example specifies files that are at least one week old
       which are made in the year 2000.

   You cannot specify two periods in timeline in one XXCOPY command.
   That is, XXCOPY maintains one "A-date value" and one "B-date value".
   If you specify two A-date values, the first such value will be
   discarded.


International conventions

   We endorse the ISO-8601 convention (DMXXTB #025) which denotes the date/time value in
   the most logical order.  But, XXCOPY also accepts other conventions
   if the date value is unambiguously specified.  It allows one of the
   three (ISO, US and EU) conventions to be used for an absolute date
   specifier as long as it is value is unambiguous.  For example,

       /DA:2000-01-02      // ISO  the first value is larger than 1970
       /DA:0-1-2           // ISO  0 (for 2000) cannot be for month or day
       /DA:12-13-2000      // US   the value 13 cannot be a month value
       /DA:01-13-01        // US   the only one to have 13 in the middle
       /DA:13-10-2000      // EU   the value 13 cannot be a month value

    This applies to the partial date specifiers.  Therefore, both
    /DA:2000-03 and /DA:03-2000 are accepted as equally unambiguous.

    But, when there are more than one way to interpret the date value,
    the system's date format setting will be used to resolve ambiguity.
    The following date specifiers are such ambiguous cases and we
    suggest you avoid these cases.

       /DA:1-2-3           // can be ISO, US, or EU;  pretty bad
       /DA:12-12-12        // can be ISO, US, or EU
       /DA:1-2-2000        // can be US or EU
       /DA:11-12-13        // can be ISO, US, or EU
       /DA:13-12-11        // can be ISO, or EU

    I hope by now, you are convinced of the superiority of the ISO
    notation which also gives you the convenience of easy sorting.

    In the case of the partial date specifier, the year value must
    always be in a full 4-digit value.  In this case, the order of
    the year and month value can be switched without causing any
    ambiguity.  For example;

       /DA:2000-01         // partial ISO notation
       /DA:12-1999         // US/EU


File time-related switches

  All file time related functions can be further modified by various
  switches to meet your specific needs which may be different from
  the majority users.


  /FW, /FA, /FC (Last-Written, Last-Accessed, Created)

    Under normal circumstances, the file date/time XXCOPY uses is the
    time the file was last written (the commonly used file time value,
    /FW as the default), it can be substituted by the last-accessed
    time (/FA) or file creation time (/FC).

  /FL, /FU (Local time, UTC time)

    The commonly used file time is expressed by the local time (/FL
    as the default).  However, in networking environment, it may be
    more convenient for some users to enter the file time using the
    UTC time (/FU) which is also known as GMT (Greenwich Mean Time).

  /FT (File time truncation)

    When file time is compared against one another in a mixed OS
    environment, the granularity of the file time stamp (which is
    usually set by the particular file system) may cause problems.
    For example, the FAT based file systems (FAT12, FAT16, FAT32)
    uses file time which is measured by two second interval whereas
    unix-based file system uses one second interval. The NTFS uses
    much finer file time.  The /FT switch forces XXCOPY to truncate
    a file time to the coarsest (two second interval) unit before
    file times are compared.



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #18



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: The filename matching schemes in Win32 and DOS
Date:    2001-02-14  (revised with a new subject)
====================================================================

Longname revisited

  When Microsoft introduced the long filename to the Windows operating
  systems (Windows 95, 98, ME, NT4, and 2000), the legacy file access
  method using the shortname alias (the so-called 8.3 format) had to
  be supported.  Having two names for an object solved many problems.
  Yet, it also created a few undesirable side effects, albeit they
  are rather subtle.

  The most notorious aspect of the dual identity for the file and
  directory, is probably the synthesized shortname when a file is
  copied.  XXCOPY's /NX switch (by default) solves most of this
  problems by preserving the shortname.

  Recently, Microsoft added the new /N switch to its XCOPY utility
  which handles the filename using the shortname.  That is, the
  behavior of Microsoft's XCOPY is somewhat like our XXCOPY16
  (which can be launched in the Win32 environment).

   ------------------------------------------------------------------
    Microsoft's recent addition of the new /N switch to its XCOPY
    forced us to provide the same function in our XXCOPY in order to
    maintain full compatibility.  The function which was previously
    assigned to the /N switch (the shortname preservation) is now
    denoted by /NX (and /NX0 to disable).
   ------------------------------------------------------------------


The filename matching schemes (Loose name-matching)

  A close examination of the behaviors of Microsoft's XCOPY utility
  with regard to the filename matching function reveals an interesting
  but potentially troubling implementation.  That is, the filename
  matching in XCOPY (as well as the DIR command) is performed on both
  the longname and the shortname.  When either of the names matches
  the filename template, the file is selected.

  Say, you have a file \src\longname5.txt (shortname LONGNA~1.TXT).

  When you use Microsoft's file utilities such as the DIR, COPY,
  or XCOPY commands in the Win32 environment, the file can be
  accessed in any of the following commands,

     DIR     \src\*5.txt
     DIR     \src\*1.txt
     COPY    \src\*5.txt
     COPY    \src\*1.txt
     XCOPY   \src\*5.txt
     XCOPY   \src\*1.txt

  So, in the Win32 environment, a filename pattern applies to both
  the longname and the shortname.  As you might expect, our XXCOPY
  also behaves in the same way.

     XXCOPY  \src\*5.txt
     XXCOPY  \src\*1.txt


The /N switch of XCOPY

  Presumably, the idea behind the /N switch of Microsoft's XCOPY
  utility is to emulate the DOS (real mode) environment by handling
  the filename by the shortname (8.3) format.  Indeed, when files
  are copied, the destination will only have the shortnames.
  But, Microsoft programmed XCOPY's filename matching to behave
  identically whether or not you specify the /N switch.

  Let's look at the following lines for the two files listed above.

     XCOPY   \src\*1.txt   /N
     XCOPY   \src\*5.txt   /N

     XXCOPY  \src\*1.txt   /N
     XXCOPY  \src\*5.txt   /N

  In either case, the file, LONGNA~1.TXT will be copied into the
  destination.

  Wait a minute.  You asked for \src\*5.txt, and you got LONGA~1.TXT.
  We have problem with this behavior.  The filename matching scheme
  produced this side effect, thanks to the double identity of files
  in Win32.


Ideally speaking,

  We have to characterize the filename matching scheme implemented
  by Microsoft's various file utilities as sloppy at best.  And,
  our XXCOPY must faithfully reproduce the same sloppiness :-(
  Ideally, you should be given an option to exclude either of the
  longname or the shortname from the file matching scheme.  At least,
  the shortname-only copy operation would not bring in files which
  does not match in the context.


Enter the /NP (Precise name-matching) switch

  XXCOPY allows you to specify a more precise filename matching
  operation by the /NP switch.  When this (/NP) switch is present,
  the filename matching operation will use the more precise filename
  matching method by selecting only one name (long or short) to
  match the filename.  If it is absent (/NP0), then, the filename
  matching uses both the longname and shortname to select the file.
  that is, there are four possible switch combinations:

   Switch combination  Long/Short name matching scheme    File handling
  ----------------------------------------------------------------------
   /N0 /NP0 (default) both long and short (loose match)      longname
   /N  /NP0           both long and short (loose match)      shortname
   /N0 /NP            only longname       (precise match),   longname
   /N  /NP            only shortname      (precise match),   shortname

   Note: Since the /N0 switch is default, you may not see it in examples.


Examples of usage

   XXCOPY \*~*    /S /LSL /NP   // list files with the tilde(~)
                                // character in the longname

   XXCOPY \*~*    /S /LSL       // without /NP, you get a list of
                                // mostly shortname aliases.


   XXCOPY \*1.DOC /S /NP        // copy document files with the
                                // first part ending with "1"

   XXCOPY \*1.DOC /S            // again, without /NP, the pattern
                                // is too common in the shortnames


Wildcards: the DOS-way and the Win32-way.

  With the longname in the Win32 environment, came the new filename
  matching algorithm which accommodate the new reality.  But, the
  reality is not very clean when you take a closer look.

     For example,try Microsoft's XCOPY with "very_long_name.html"

     XCOPY  ????????.htm  // 8 characters before the dot
     XCOPY  ????.???      // 3 characters after the dot

     Notice that the filename has 14 and 4 character before and after
     the dot respectively.  But, both of the above command line
     succesuflly matches the file and proceeds.  This is in Win32!!!

     The following command lines using Microsoft's XCOPY behave
     differently depending on the DOS/Win32 environments.

     XCOPY   AB*XYZ.??    // In DOS, ABCDEFGH.OK and ABCDXYZ are copied.
     XCOPY   AB*XYZ.??    // In Win32, neither of them is copied.

     Our XXCOPY/XXCOPY16 faithfully imitates the behavior of XCOPY
     (to do otherwise would make the user even more confused).

     There are many other cases which cause unwelcome surprises...

  We expect many system administrators find themselves in both the
  DOS and Win32 environments from time to time and choose the
  appropriate version (XCOPY16 or XXCOPY) accordingly.  So, having
  two sets of file-matching rules is last thing the users need.
  This is especially true with XXCOPY which now has a lot more cases
  of filename matching situations:  the Wild-Wild-Source, the
  exclusion specifiers, and the inclusion specifiers (e.g., alternate
  filename templates).


Enter the /NW and /ND switches:

  With both XXCOPY and XXCOPY16, you have full control of the
  algorithm on filename matching with wildcards.

    /NW     Win32-scheme in filename matching (default in XXCOPY)
    /ND     DOS-scheme in filename matching   (default in XXCOPY16)


    With XXCOPY (Win32 version)

      In the case of XXCOPY, you may combine this switch with other
      filename-related switches (/NP /N /NX).  In most situations,
      the best choice for XXCOPY is /NW/NP/N0/NX (which is just /NP
      by relying on the defaults).  You may use /NW and /N
      combination which applies the Win-32 wildcard matching scheme
      to the shortname.

      Note the use of /ND (DOS-way) forces the /N switch enabled.

    With XXCPY16 (DOS version)

      In the case of XXCOPY16, you don't have other choices in
      filename handling.  Due to the operation environment, it
      the following switches are not supported by XXCOPY16:

      /N  /N0    // shortname/longname access scheme (always /N)
      /NP /NP0   // loose/precise filename matching  (always /NP)
      /NX /NX0   // does not support longname        (always /NX0)

      Note that here with XXCOPY16, in the 16-bit DOS environment,
      you can use the more advanced (preferred) wildcard treatments
      by choosing /NW even though the underlying filename is still
      in the short (8.3) format.  This is in contract to the fact
      the opposite is not true that XXCOPY, the 32-bit version,
      cannot select /ND switch for longname (/N0) format.



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #19



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: XXCOPY in batch files
Date:    2000-12-31  (revised)
====================================================================

Introduction:

    XXCOPY as a general purpose file management tool, works well
    as a hand-typed command in a DOS Box.  It is also a useful
    building block of a complex task written as a batch file
    for a job like a full system backup, daily incremental backup
    as well as a specialized project archiving.  In these cases,
    the whole job is made of a series of XXCOPY commands since
    XXCOPY is better suited to handle one directory (and its
    subdirectories) at a time.  It is not uncommon that a well-
    written batch file  for a backup job consists of ten or more
    lines of XXCOPY commands.

    Since XXCOPY plays an important role in batch programming,
    mastering its command switches which are designed for such
    purposes will help you write better batch files.  The switches
    that are particularly useful inside a batch file are:

       /YY /CB /CBQ /CE /EC /IA /IP


How to get rid of the Y/N prompt.

    This is probably the most frequently asked question with
    regard to batch files.

    -------------------------------------------------------------
     The following command shows the switches which prompt you.

         XXCOPY /YY /?
    -------------------------------------------------------------

    XXCOPY provides various switches to suppress specific
    user prompts.  For example, /ZY is a variation of /Z
    which does not produce user prompts and good for batch
    file.  Similarly, /PD0 suppresses a user prompt for
    directory processing (mostly for deletion).  But, it becomes
    a hassle even to an experienced XXCOPY users.  Yes, XXCOPY
    has grown to be a monster with so many switches, you just
    can't remember all.  So, we now have an all-purpose prompt
    buster switch, /YY (super-YES).

    -------------------------------------------------------------
     Note:  although the use of /YY is very convenient to remove
            the various warning prompts, it is recommended only
            in well-tested batch files where any typing error
            would not cause any serious damage.
 
       E.g. XXCOPY  %1  %2  /CLONE /YY
  
            This is probably the worst place to use the /YY
            switch.  A user-supplied parameters (%1 and %2)
            in a batch file make the command is susceptible to
            human error.
            
            Just remember that the various warning prompts are
            there for good reason.  Using the /YY switch, you
            are denying yourself benefit of the safeguard.
    ------------------------------------------------------------

Example of a standard batch file.

    Advanced batch programmers test the exit code (ERRORLEVEL)
    returned by a program and branch off if certain conditions
    are met (e.g., terminate when a fatal error occurs).  Due to
    the severe limitation in the batch language, a typical batch
    file with conditional branching usually looks quite unsightly.

      ------------------------------------------------------
       XXCOPY c:\windows\  d:\backup\windows\   /S /Y
       IF ERRORLEVEL 100 GOTO step2
       IF ERRORLEVEL 1   GOTO end
       :step2
       XXCOPY c:\mydir\    d:\backup\mydir\     /S /Y
       IF ERRORLEVEL 100 GOTO step3
       IF ERRORLEVEL 1   GOTO end
       :step3
       XXCOPY c:\yourdir\  d:\backup\yourdir\   /S /Y
       IF ERRORLEVEL 100 GOTO step3
       IF ERRORLEVEL 1   GOTO end
       ...
       :end
      ------------------------------------------------------

    Here, the ERRORLEVEL returned by XXCOPY is tested for both
    the lower and the upper bounds to perform the conditional
    branching.  Most of the typing is consumed for the error
    handling.  It takes a lot of self discipline to write a good
    bath file with proper testing.

    By the way, a list of the exit code generated by XXCOPY can
    be viewed by running the following command:
    
        XXCOPY  /HELPE

    Also see article: XXTB #31, about Exit Code.


Using the /CB switch, the same sequence becomes...

      ------------------------------------------------------
       XXCOPY      c:\windows\  d:\backup\windows\   /S /Y
       XXCOPY /CB  c:\mydir\    d:\backup\mydir\     /S /Y
       XXCOPY /CB  c:\yourdir\  d:\backup\yourdir\   /S /Y
       ...
       :end
      ------------------------------------------------------

    In this alternative batch file, the IF ERRORLEVEL... lines
    are eliminated by the use of the /CB switch (except the first
    line).  The /CB switch which stands for "Continue-Batch"
    examines the exit code returned by the previous execution of
    XXCOPY and immediately terminates the current execution if
    the previous error condition was fatal (such as disk-full,
    or a user-abort).  How does one instance of XXCOPY know
    the exit code of its previous run?  Simple.  XXCOPY stores
    its exit code in the system registry for its own retrieval
    later.  Notice that there is no awkward branching in the
    batch file.  Actually, the exit code of one XXCOPY is NOT
    examined by the batch execution mechanism.  Therefore, the
    flow of the batch file is always to execute all the lines
    in the file.  The /CB switch provides a mechanism where a
    fatal error reported by one XXCOPY instance will propagate
    through the rest of the batch file execution that all
    subsequent XXCOPY lines with the /CB switch will be nullified.

    Note:  The position of the /CB switch within the command
           line is not significant.  Because of it's early action,
           it seems most appropriate to place it early on the line.


/CBQ for a cleaner screen when the batch file is aborted.

    Actually, /CBQ (the quiet version) is preferred by most
    users since this version will keep the console screen
    much cleaner when it is combined with a "ECHO OFF"
    statement in the batch file.

      ------------------------------------------------------
       @ECHO OFF
       XXCOPY       c:\windows\  d:\backup\windows\   /S /Y
       XXCOPY /CBQ  c:\mydir\    d:\backup\mydir\     /S /Y
       XXCOPY /CBQ  c:\yourdir\  d:\backup\yourdir\   /S /Y
       ...
       :end
      ------------------------------------------------------

    The virtue of running the batch file with the ECHO OFF
    setting is that the XXCOPY lines subsequent to a fatal error
    of an XXCOPY will not clobber the screen.  The last XXCOPY
    line with the error message will not be pushed off the screen
    with echoed command lines even though they terminate immediately.

            ---------------------------------------------------------
             What does the @ECHO OFF statement do?

             ECHO OFF inside a batch file turns off the display
             of the command line (the current line in the batch
             file.  Without it, every line in the batch file will
             appear on your console.  An at sign (@) at the beginning
             of a line in a batch file turns off echoing just one
             line (You may add an at sign (@) on every line to have
             the same effect as ECHO OFF.  The first at sign (@) in
             the first line suppressing the echoing of its line, too.
            ---------------------------------------------------------


/EC and /CE for even a better batch file.

    The problem of running the batch file with ECHO OFF mode
    is that the screen will not show the command invocation.
    What we really want is to generate no output to the console
    when XXCOPY is terminated by the /CB mechanism but to echo
    the invocation line if it will continue the execution.
    That is what /EC (to echo the command line) does.  Moreover
    the /CBQ/EC combination is so handy in a batch file, XXCOPY
    assigns a new switch, /CE as the shortcut for /CBQ/EC.
    So, rewriting the same batch file, it should look like

      ------------------------------------------------------
       @ECHO OFF
       XXCOPY /EC  c:\windows\  d:\backup\windows\   /S /Y
       XXCOPY /CE  c:\mydir\    d:\backup\mydir\     /S /Y
       XXCOPY /CE  c:\yourdir\  d:\backup\yourdir\   /S /Y
       ...
       :end
      ------------------------------------------------------

    Note that it is not a typo!  The first line uses /EC (echo)
    and the other lines are with /CE (shortcut for /CBQ/EC).
    It looks symmetrical and even cute.


Using XXCOPY macro to create a unique destination.

    When you create a batch file for a periodic (daily) backup,
    you may want to encode the current date (today) as a part
    of the destination directory name you create.  XXCOPY's macro
    reference feature (/$xxxx$) was designed exactly for that.

    For example, when you can enter

        XXCOPY C:\  D:\mybackup\DB/$YYMMDD$\  /CLONE

    and it will be expanded to

        XXCOPY C:\  D:\mybackup\DB011225\     /CLONE

    (assuming the current (today's) date is December 25, 2001.)
    See article: XXTB #24, about Macros.


Testing if a directory exists

    The following sequence is a well established technique to
    test whether or not a directory exists in a batch file.

      ------------------------------------------------------
       IF EXIST d:\backup\mybackup\nul goto next
       XXCOPY c:\  d:\backup\mybackup\ /CLONE
       :next
      ------------------------------------------------------

    The IF EXIST (and IF NOT EXIST) construct is good only for a
    file, not a directory.  Here, the neat trick is based upon the
    fact the virtual file, "NUL" is guaranteed to exist on any
    directory.

    Now, using XXCOPY'S /IA (which stands for "If Absent"),
    the same command line will be re-written as

      ------------------------------------------------------
       XXCOPY c:\  d:\backup\mybackup\ /IA /CLONE
      ------------------------------------------------------

    The /IA switch continues to run only if the destination directory
    is absent (that is, /IA will terminate immediately if the
    destination exists).  It is equivalent to the "IF NOT EXIST"
    construct in the batch file.  On the other hand, /IP (If Present)
    continues to run only if the destination is present (that is,
    /IP will terminate immediately if the destination does not exist).
    it is exact opposite of /IA.


Testing a directory using macro.

    The power of /IA and /IP becomes even more evident when you use
    a destination directory which is specified by a macro reference.

      ------------------------------------------------------
       XXCOPY c:\  d:\backup\DB/$YYMMDD$\ /IA /CLONE
      ------------------------------------------------------

    In this case, it's not a matter of making the batch file shorter
    and prettier.  There is no simple way to test the presence or the
    absence of a directory whose name is "synthesized".

    This command executes only when the directory is absent.
    This technique prevents running the same daily backup routine
    twice on the same day.



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #20



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: More on Directory Cloning using XXCOPY
Date:    2000-10-31
====================================================================

The topics included in this page were originally in the Disk Cloning
article XXTB #10.  Since most first-time visitors want to learn the simple
disk clone operation and tend to be in a hurry, I decided to do them
a favor by removing much of the variations and related materials from
the page and keep the other article focused on the disk clone case
only.  Here, a few variations which are related to the /CLONE switch
are discussed.


1.  Partial Disk cloning (bootable):

    This is a variation of the first one (Full Disk Cloning).
    It copies the minimum set of files into the new disk so that
    the new disk will become a bootable disk.  You may selectively
    add more directories and files if you want.  Here, the windows
    directory is assumed to be named C:\Windows (this is the default;
    but some people may call the windows directory C:\Win95, C:\Win98
    or whatever...)

    Batch file contents
    ----------------------------------------------------------
     XXCOPY C:\        D:\         /h/r/y/ks/zy
     XXCOPY C:\Windows D:\Windows  /h/r/y/ks/zy/e/i/xtemp*\
    ----------------------------------------------------------

      Explanation:

        /i    // initializes (creates if absent) the new directory
        /x    // excludes (in this case, directories starting "temp")

    This batch file works even when the destination volume is
    not empty.  It handles only the root directory (the top layer
    only without including all the subdirectories) in the first
    statement.  The second one will handle the entire windows
    directory.  The /xtemp*\ switch excludes all directories whose
    name starts "temp" in \Windows.  This eliminates the official
    windows temporary directory (C:\windows\temp\) and the hidden
    internet-related temporary directory used by Internet Explorer
    (C"\windows\Temporary Internet Files\).  You may add more
    exclusion items.

    Caution:

      The /CLONE, /Z, and /ZY switch performs deletion of extra
      directories and files in the destination.  If you inadvertently
      specify a wrong destination, the consequence will be very
      severe.  Some careless users have lost many files by this!!!

    Note that this script does not give you the absolute minimum
    set of files in the destination for Win9x.  It will contain many
    files that are not essential to the minimum Win9x.  Also note
    that an international (non-US) version of Windows may require
    additional language-specific files.


2.  Partial Disk cloning (bootable, even smaller):

    This is another variation of the second one with more strict
    selection of files (but not the absolute bare minimum).

    Batch file contents
    ----------------------------------------------------------------
     XXCOPY C:\                D:\                 /h/r/y/ks/zy
     XXCOPY C:\Windows         D:\Windows          /h/r/y/ks/zy/i
     XXCOPY C:\Windows\system  D:\Windows\system   /h/r/y/ks/zy/i
     XXCOPY C:\Windows\fonts   D:\Windows\fonts    /h/r/y/ks/zy/i
     XXCOPY C:\Windows\inf     D:\Windows\inf      /h/r/y/ks/zy/i
     XXCOPY C:\Windows\command D:\Windows\command  /h/r/y/ks/zy/i
    ----------------------------------------------------------------

    Note that this script does not give you the absolute minimum
    set of files in the destination for Win9x.  It will contain many
    files that are not essential to the minimum Win9x.  Also note
    that an international (non-US) version of Windows may require
    additional language-specific files.


3.  Backup to multiple removable media (floppy, CD-R, zip drive, tape)

    A very common headache in backup today is that none of our
    removable storage device such as the CD-R and Zip drive gives
    us a sufficient capacity for a full backup in one volume.
    Since most device drivers do not provide a volume-spanning
    capability, we are left without a decent solution.  Here's
    one way to do it using XXCOPY.  This technique is nothing
    new.  It is as old as XCOPY and the Archive attribute bit.
    The basic principle is described in our earlier article, XXTB #06.
    Here, in the following example the A: (floppy disk) drive is
    used the destination --- but let's not kid ourselves...

    Batch file contents
    ----------------------------------------------------------------
     XXCOPY C:\                /aa/h/s/q
     :looptop
     @echo.
     @echo  Insert a blank media and hit a key to continue
     @echo.
     @pause
     XXCOPY C:\   A:\          /m/h/r/y/ks/zy/s/q
     goto looptop
    ----------------------------------------------------------------

      Explanation:

        /aa  // sets the archive attribute bit (no copy takes place)
        /q   // quiet (reduces screen output on superfluous info)
        /m   // copies files with archive bit and clears the bit

     The first statement simply sets the archive bit on every file in
     the source directory.  Then, the batch file enters an infinite loop
     (from which you can exit only by typing Ctrl-C or Ctrl-Break)
     where you are asked to insert a new diskette (or whatever),
     and exactly the same XXCOPY command copies a diskette-full chunk
     at a time.  The trick here is the good old /M switch which clears
     the archive bit of as soon as a file is successfully copied to
     the destination.  It's not really a fancy technique but it works.

     This technique is not limited to a full backup.  You may choose
     a subdirectory and apply the same method (add the /i switch then).

     In a real life backup situation, I strongly suggest that you
     learn and use XXCOPY's /X and /EX switches in order to avoid
     files that do not need a backup.  Otherwise, you will end up
     creating a massive amount of backup data where most of the files
     are available on your CD-ROMs somewhere.

     As Microsoft's programmers bloat the Windows software and force
     us to buy ever increasing amount of hard disk space, the
     percentage of user-generated data is declining in most computer
     systems.  Therefore, we need to be clever and more selective in
     setting up the backup script.


If you have a nifty batch file using XXCOPY and want to share with
other XXCOPY users, please let us know.  We may publish good ones.

Please send E-Mail to <tech@xxcopy.com>.



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #21



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: XXCOPY in a network environment
Date:    2000-11-14
====================================================================

While XXCOPY is useful in a stand-alone PC, it is widely used in
network environments.  Since the default settings of various XXCOPY
operations are designed primarily for copying local drives, you
need to pay special attentions when you operate XXCOPY in a
network environment.

In this article, the following XXCOPY command switches are examined
specifically with networked environments in mind.

   /NX0    Disables the shortname preservation feature
   /FT     Truncates the time value to be FAT-compatible
   /CK0    Disables pre-checking of the remaining space
   /FU     Selects universal time (UNC) for file time


1.  The Shortname preservation.

      One of the reasons XXCOPY enjoys its popularity among freeware
      users is the shortname preservation feature.  While this
      feature is essential to ensure a proper duplication of the
      system drive, the feature may not work (and even becomes a
      detriment) in some networked environment with mixed Operating
      Systems (or file systems) where the source and the destination
      volumes are of different type in file system.  It is best if
      you test whether the shortname-preserving feature is working
      for you on your particular environment.

      Since shortname preservation feature requires XXCOPY to
      issue a sequence of system calls for renaming, it is a
      time consuming operation especially when it fails.  If your
      XXCOPY exhibits an inordinately low performance, you should
      suspect this feature as the likely cause of the trouble.
      In that case, just add  /NX0 to disable the feature (giving
      up the idea of preserving the shortname).  For example,
      it would be futile for XXCOPY to save the shortname while
      the underlying OS (e.g, Linux) does not even support it.

      XXCOPY sets the /NX switch on a local drive copy.  And, if
      either the source or the destination is specified by an UNC
      (starting with two backslashes.  E.g,  \\myserver\cdrive\),
      the /NX0 is used as the default setting.  If you assert your
      desire by an explicit /NX switch, the switch will be honored.

      Unfortunately, it is not always easy for XXCOPY to determine
      whether the combination of the source and the destination is
      suitable for the /NX operation, an explicit command switch
      of /NX and /NX0 should work the best.

       -----------------------------------------------------------
        Starting with v2.43.x, the shortname preservation feature
        is disabled by an UNC specifier either on src or dst.

        Due to Microsoft' XCOPY added their /N switch in recent
        Windows 9x release, XXCOPY's shortname preservation
        feature is no longer assigned to /N.  Starting with
        v2.42.0, it is controlled by /NX and /NX0.  We regret
        that this change forced us to broke existing batch files.
       -----------------------------------------------------------

      See article: XXTB #03, for related topics.


2.  Time stamp granularity.

      Different file systems use different ways to keep track of
      the date and time information associated with a file.  When
      you use XXCOPY to transfer files from one file system to another,
      you should be aware of the characteristics of the file system.
      The granularity of the file time maintained by the OS is the
      first one to note:

            File System             File time granularity
           -----------------------------------------------
            FAT12/FAT16/FAT32            2 sec
            NTFS                       100 nsec
            Unix/Linux                   1 sec

      If your XXCOPY operation does not check the file time as the
      criteria for file selection, the granularity is not an issue.
      However, when you use an operation which involves the file time,
      you should know more.  The following list shows the switches
      which depend on the time stamp of the file.

          /BI     Backup Incremental
          /BN     Backup Newer files
          /Bo     Backup Older files
          /BS     Backup Same-time/size files
          /BX     Backup Different-time/size files
          /BU     Backup (combination using /BI)
          /DA     Copies Newer files
          /DB     Copies Older files
          /DS     Copies Same-time files
          /DX     Copies Different-time files
          /CLONE  Backup (combination using /BI)

      The best way to handle such a case with mixed file systems is
      to use the /FT (Filetime-Truncate) switch.  It converts all
      file time values into the FAT representation (2-second
      granularity) before a comparison is made.


3.  Remaining space check.

      Ideally speaking, a file copy utility should know the remaining
      space on the destination before a copy operation is started.
      That is exactly what XXCOPY does.  However, when the destination
      directory is on a remote machine, the value XXCOPY receives as
      the remaining space from the Operating system is sometimes
      not accurate.  When this happens, XXCOPY terminates the current
      session and returns the "Disk Full" error condition.

      Many users have reported that XXCOPY prematurely terminates
      a session due to a false reading on the remaining space.  That
      is, XXCOPY's idealistic design backfires --- and the more
      primitive design (e.g., the COPY command) works better by not
      checking the remaining space.  So, you can override XXCOPY's
      pre-check feature by /CK0  (default is /CK).


4.  Time stamp type, and locality .

      The original FAT12 and FAT16 file systems used by DOS had only
      one type of file time which represents the last-modified time.
      The FAT32 and NTFS maintain three types of time stamps for each
      file.

          Time when the file was Last-modified  (/FW  default)
          Time when the file was First-created  (/FC)
          Time when the file was Last-accessed  (/FA)

      By default, XXCOPY uses the Last-modified value as the file
      time (/FW).

      The file time is referenced either by the local time or by the
      universal time (UTC, also known as GMT).  The default setting
      uses the local time since most of us eat lunch at Noon(?).
      The setting is either /FL (Local, default) and /FU (UTC).


      Since we do not hear much problems associated with the
      time-representation aspects, we assume this is not a serious
      issue with XXCOPY.  But, XXCOPY is prepared to deal with it.

      See article: XXTB #15, for related topics.


5.  Conclusion

      In this article, a few solutions are provided to alleviate
      common problems dealing with XXCOPY operation across networked
      drives.  The solutions listed here generally works.  However,
      they are only a guideline and your case may involve other
      factors which are overlooked in this article.

      For example, there is an inherent limitation to the accuracy
      of backup operation when you use the /FT switch to truncate
      the file time before comparison.  If you do not use the /FT
      switch, XXCOPY may select more than 50% of files for incremental
      backup while only a small fraction of them are really different.
      On the other hand, if you use /FT, a few unfortunate pairs
      of files whose time difference of 1 second is genuine would
      not be selected.  In a case like this, XXCOPY cannot help
      (nor any other utility).  It is a trade off.

      Please note that this article does not cover all common pitfalls.
      We welcome your feedback when you encounter similar problems
      which we have not yet addressed.


Please send E-Mail to <tech@xxcopy.com>..



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #22



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: The leading backslash in a filespec
Date:    2002-01-03 (revised)
====================================================================

Introduction:

  As we see more and more IT professionals who are born after the
  WYSIWYG/GUI scheme was invented, certain key concepts which we
  took for granted are no longer a commonsense...

      xxcopy c:\  d:\  /clone
      xxcopy c:   d:   /clone

  If you know the difference of the two lines, just forget this.
  But, if you consider the two are about the same, this article
  is for you.  The difference is subtle and in many cases, the
  two lines are the same, indeed.  Howerver, in the second line,
  the context determines what will be copied and where will be
  the destination directory (and what will be deleted from the
  destination).


Absolute pathspec and Relative pathspec.

  The first line of the above example explicitly specifies
  that both the source and the destination are the root
  directory of respective drives.  The second line does not
  specify which directory in the source and which directory
  of the destination within the respective drives.  That is,
  the second example above relies the exact location of both
  the source and the destination directories on the default
  behavior of the OS.  Microsoft's OSes keep track of the current
  (default) directory on each volume.  If it has not been
  defined yet, it will go to the root directory (which is what
  most users want).  Depending on the setting, when you open up
  a DOS box, the current (default) directory may or may not be
  at the root directory.  Also, the current directory of C: may
  be at c:\windows whereas on D:, it may be D:\.  You just
  cannot easily predict what it may be.  Therefore, the common
  assumption that an unspecified path is equivalent to the root
  directory is extremely dangerous with a tool like XXCOPY.
  The consequence of the /ZY switch (which is part of the
  /CLONE switch) on a wrong source or destination could be quite
  FATAL (wipes out all mismatched directories along with their
  entire contents).


Actual examples:

  Let me give you one concrete example.  If you run the
  following command,

      cd  d:\mydir

  The current directory of Volume D: will be set to d:\mydir.
  So, unless you change the current (default) directory of
  Volume D: back to its root, when you say

      xxcopy c:\  d:        /clone

  Then, the line is equivalent to

      xxcopy c:\  d:\mydir  /clone


  Similarly, when volume C:'s current directory is not at the
  root directory (it could be at c:\windows) and you try to copy

      xxcopy c:  d:\          /clone

  In this case, it is equivalent to

      xxcopy c:\Windows  d:\  /clone

  Again, it would give you quite a surprise.


More than one "current" directory:

  With the most popular setting of the DOS prompt which usually
  shows you the "current directory of the current drive" such as
  the following,

    C:\Windows> _

  You don't get any feedback on what is the setting of another
  drive.  For example, the same example shown above, the console
  (the DOS box window)

    C:\Windows> cd d:\mydir
    C:\Windows> _

  When the cd (chdir) command succeeds, there will be no confirming
  message.  The command is quietly accepted and executed.


Why XXCOPY does not supply the leading backslash for you?

  Believe it or not, the way the Absolute pathspec and relative
  pathspec are handled throughout the command line environment,
  be it DOS, Win32, or even Unix, the convention for the absolute
  pathspec and the relative pathspec are so fundamental and
  ubiquitous, if we were to implement XXCOPY's own convention
  and let XXCOPY implicitly supply the missing leading backslash,
  it would create an unbelievable chaos.

  Therefore, XXCOPY cannot help you on this, except it prompts
  you with an additional warning prompt.


Similar cases everywhere:

  The distinction of the absolute and relative path is not limited
  to the source and the destination pathspecs.  It applies to
  any filename you specify in the XXCOPY command line (and also
  for most other programs in Windows).  For example, we often
  hear users complaining about XXCOPY not creating the log file.
  You may have a habit of being casual about creating a log file,

      XXCOPY c:\src\  d:\dst\  /onmyerror.log

  and find no problem.  Yet, when you make a batch file using
  the same line, you may not find the log file as easily.  If you
  don't control the "current directory" of the batch file
  invocation, you may have a hard time locating the log file.

      --------------------------------------------------
       In Windows (for all the 9x and NT families),
       every shortcut object comes with a setting of
       the "current directory" (Right-click on the icon
       and look for the "Start in" setting).  In a case
       of a program file or a batch file, the directory
       specified in the "Start in" setting becomes the
       current directory when the program is executed.
      --------------------------------------------------
 
  My advice is to spell out the full filespec always:
  
      XXCOPY c:\src\  d:\dst\  /on"C:\My Document\myerror.log"


Conclusion:

  So, if you are in a position to advise others on how to use
  XXCOPY with a concrete example, please do not abbreviate the
  leading backslash for cloning a directory.  This one-character
  difference could be just too great to ignore.

  Let me repeat,

  PLEASE NEVER USE A SLOPPY COMMAND LINE LIKE THIS

      xxcopy c:  d:   /clone     // BAD BAD BAD EXAMPLE!!!

  The /CLONE switch is too dangerous to let the system default
  setting determine the fate.  Instead always specify the
  directory using the full (absolute) directory path

      xxcopy c:\  d:\  /clone



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #23



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: The enhanced features of XXCOPY at a glance
Date:    2000-12-06
====================================================================

Here are some of XXCOPY's enhanced features over Microsoft's XCOPY.

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

 1. "Wild-Wild-source"

    XXCOPY c:\windows\*\*cache*\*\*.jpg  c:\myimages\

    Note the number and the positions of asterisks in the source.

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

 2. Exclusion switch (file template)

    XXCOPY c:\*\*cache*\*  \dst\   /X*.gif /X*.bmp

    /X allows you to exclude files that match the tempalte

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

 3. Exclusion switch (directory template)

    XXCOPY c:\  \dst\ /S  /Xtemp*\*\*.gif /X*\internet\*\*.mp3

    /X allows you to specify a group of directories and/or files
    that match quite a variety of directory/file patterns.

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

 4. Inclusion switch (file template only)

    XXCOPY c:\*.img   \dst  /S /IN*.bmp /IN*.gif /IN*.bmp

    /IN allows you to specify an "include" filespec (alternate
    filename pattern).

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

 5. Limit by file size

    XXCOPY c:\   d:\backup\  /S /SZ:-10000000

    This example copyies files whose size is 10MB or less.

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

 6. Select files by age

    XXCOPY c:\   d:\backup\  /S /DA#5

    This command copies files that were made within 5 days

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

 7. Select files by year/month/date

    XXCOPY c:\   d:\backup\  /S  /DA:2000-10

    This command copies files that were made in October, 2000 or later.

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

 8. Select the range of file date

    XXCOPY c:\   d:\backup\  /S  /DA:1999-1-1  /DB:1999-6-30

    The file range of Date betwen Jan 1 and Jun 30 of 1999.
    /DA (On-or-After) and /DB (On-or-Before) bracket the date range.

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

 9. Alternative to DELTREE

    XXCOPY "c:\My Documents\*\*.mp3" /RMDIR /DB:1999-12-31

    XXCOPY is not just for file copy.  The rich set of file selection
    switches can be applied to file deletion as well.

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

10. Complex file search for a listing of custom output format.

    XXCOPY c:\windows\*\*cache*\*\my*\*\*.jpg  /LZDTL

    The /L switch offers a search and list capability with format control.
    This example lists Z(file size), D(ate), T(ime), and L(ongname).

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

This list gives you only ten relatively straightforward switches to
illustrate the power of XXCOPY.  The over 200 enhanced switches in
XXCOPY can be combined for millions of combinations to fit your
needs.  For a complete list of switches, see XXTB #01.



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #24



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: XXCOPY's Macro processing feature
Date:    2003-05-01  (revised)
====================================================================

Introduction:

    When you create a batch file which performs a daily backup, you
    may want to name the destination directory after the current
    date and/or time.  Using the standard batch file this is rather
    difficult without a help of some fancy batch enhancer.

    For example, you may want to name today's backup destination
    directory using the current time

       XXCOPY C:\   D:\BACKUP\DEC-20\                   /S
       XXCOPY C:\   D:\BU001225\                        /S
       XXCOPY C:\   D:\BACKUP\2000-12-25\               /S
       XXCOPY C:\   D:\BACKUP\DAILY\FEB.04.2000.BUP\    /S
       XXCOPY C:\   D:\BACKUP\WEEK\BKUP_WED.BUP\        /S

    What is needed is to synthesize certain names based on the current
    system time.


The XXCOPY macro processing feature.

    XXCOPY provides a set of predefined variables which can be entered
    in your command line (or the current value in the string of environment
    variable, XXCOPY).  The technique used here is sometimes called
    "Macro processing" albeit this is a very small implementation which
    allows you to reference (you cannot add new macro definitions) a
    predefined value through a simple rule of substitution.

    Macro reference may be used anywhere in your command line (or the
    XXCOPY environment variable (XXCOPY and XXCOPYX), or even in the
    exclusion item parameters.  That is, anywhere you normally supply
    a string of characters, you can place a macro reference.

    The trouble is, people's tastes are so different, providing just
    one way would always make someone unhappy.  Take the date for
    example, despite our crusade in advocating the ISO 8601 standard
    (yyyy-mm-dd), few would listen.  So, XXCOPY provides just a few
    building blocks and lets you combine them whichever way you want.


The macro reference examples

    Before showing the gory details, let me show you examples which give
    you a good start.  Just observe what is going on.  You will get a
    pretty good idea how XXCOPY processes the macros.

    Let's assume it is  Friday, July 4, 2003 01:05:30 pm.

    /$DATE$        --->  0704          // common 4-digit month/day
    /$TIME$        --->  1305          // common 4-digit hour/minute
    /$YYYY-MM-DD$  --->  2003-07-04    // hyphens may be added
    /$M-D-YY$      --->  7-4-03        // no leading zeros for mn dy
    /$DD.MM.YY$    --->  04.07.03      // Europeans may like this
    /$MON-DD$      --->  JUL-04        // 3-letter month may be used
    /$WWW$         --->  FRI           // 3-letter day of week
    /$IIII-IWK-K$  --->  2003-W17-5    // ISO-8601, Year, week no, day-of-week


What is a valid macro reference?

    /$xxxxxx$

    XXCOPY's macro reference always starts with a slash (/) which is
    immediately followed by a macro reference string which starts with
    a dollar sign ($) followed by zero or more macro keywords and ends
    by a dollar sign.

    Within the two dollar signs of a macro reference (xxxxxx shown above),
    zero or more of predefined macro keywords may be specified (multiple
    keywords are combined without any separating character).

    The following keywords are currently supported (we may add more
    later).

      Keyword     Value       comment
     -----------------------------------------------------------
      HOST        MYWINPC     up to 15 character machine name
      YYYY        2003        4-digit year (good for 10000 years)
      YY          03          2-digit year (good for a century)
      Y           3           1-digit year (good for a decade)
      MON         DEC         3-letter month name
      MM          07          2-digit month
      M           7           1 or 2 digit month (without leading 0)
      DD          04          2-digit day
      D           4           1 or 2 digit day (without leading 0)
      HH          13          2-digit hour (00-23)
      H           13          1 or 2 digit hour (0-23) (without leading 0)
      NN          05          2-digit minute
      N           5           1 or 2 digit minute  (without leading 0)
      SS          30          2-digit second
      S           30          1 or 2 digit second  (without leading 0)
      DATE        0704        same as MMDD
      TIME        1305        same as HHNN
      WWW         FRI         3-letter day of week name
      W           5           1-digit day of week (Sun:0 - Sat:6)
      IIII        2003        4-digit year (ISO week number notation)
      II          03          2-digit year (ISO, 2-digit-year value)
      IWK         W17         2-digit week number (always prefixed by W)
      K           5           1-digit day of week (ISO, Mon:1 - Sun:7)


Single-key macro reference

    The simplest macro reference is made of one keyword inside.

      /$DATE$    --->   0704

    You may combine as many single-key macros

      /$YYYY$/$MM$/$DD$   --->    20030704


Multiple-key macro reference

    You may chain two or more keywords within a macro reference
    without any other character.  A macro reference is parsed
    from left to right and the longest string which matches the
    pattern will be used first.

      /$YYYYMMDD$  --->   20030704     // same as /$YYYY$/$MM$/$DD$
      /$YDATE$     --->   30704

    For readability and punctuation, the following characters are
    also supported.

       T ! # % & ' ( ) , - . @ _ { } ~ `

    These characters function as a keyword and represent the character
    literally (after expansion, they appear as typed in the reference).

      /$YYYY-MM-DD$  --->   2003-07-04


Miscellaneous rules.

    1.  You may use a keyword within a macro reference more than once.
        (In nearly all cases, this makes little sense, but it's allowed).

         /$YYYYYYYY$  --->   20032003  ( YYYY  and YYYY )
         /$YYYYYYY$   --->   2003033   ( YYYY and YY and Y )
         /$WWWW$      --->   FRI5      ( WWW and W )

    2.  Macro reference is case-insensitive

         /$DATE$      --->   0704
         /$date$      --->   0704
         /$DaTe$      --->   0704

    3.  Macro reference is case-preserving

         /$MON        --->   JUL
         /$mon$       --->   jul
         /$Www$       --->   Fri
         /$wWw$       --->   fRi

         Note:  Of course, this feature is good only for XXCOPY.
                Since XXCOPY16 is governed by the DOS rule, all
                filenames will be converted to uppercase only.

    4.  A dollar sign ($) cannot be inside a macro reference.
        If you need a dollar sign, you should do it outside.

         /$MM$$/$DD$  --->   07$04    // a macro, $, and another macro

    5.  Year, followed by week-number should be denoted by
    
         /$IIII-IWK$  --->   2003-W27 // See below for details


Where can a macro reference be placed?

    You may use a macro reference string ( /$xxxx$ )  anywhere in your
    command line as well as in the environment variables, XXCOPY and
    XXCOPYX (yes, even inside an exclusion specifier).  That means, you
    may place it in the external exclusion list file (specified by
    the /EX switch).  It is also permitted in alternate filename template
    (/IN) specifiers.  In short, practically anywhere you enter a string
    of text, XXCOPY will accept a macro reference and expand it
    accordingly.


Recommendation of macro usage.

    For DOS-compatibility, you should keep the directory names to
    the 8.3 format.  It will be much easier to access directories
    from a real mode (DOS) environment.

    For routine backup, a five- or six-digit date code is probably
    a good choice for most occasions.

     d:\bu\bu/$yymmdd$.c\    --->   d:\bu\bu030704.c\
     d:\bu\b/$ymmdd$_c\      --->   d:\bu\b30704_c\
     d:\bu\bu_/$MONYY$\c\    --->   d:\bu\bu_JUL03\c\

    Using two-digit year value as opposed to one-digit year value
    is all up to you.  In general, just 1-digit year format gives
    you values that are unique for ten years.  That's quite adequate
    for most backup operations.  In this context, using a four-digit
    year value (/$YYYY/) in the directory name is overkill especially
    if the directory name exceeds the 8.3 format.


The ISO 8601 standard.

    We take a very strong position in endorsing the ISO 8601 standard
    which provides logical and convenient guidelines in describing
    date and time values.  Visit http://www.iso.ch.

    The most prominent aspect of the ISO 8601 standard is of course,
    its date order in the YYYY-MM-DD format and the 24-hour notation,
    hh:nn:ss.  XXCOPY also supports ISO's lesser-known week date
    representation.
    
    According to the ISO definition, the week begins on Monday and
    ends on Sunday.  XXCOPY denotes the ISO's day-of-the-week
    value using /$K$.  The only difference between ISO's day-of-the-
    week value (/$K$) and the traditional day-of-the-week radix (/$W$)
    counterpart is the value for Sunday (/$K$ = 7 and /$W$ = 0);
    other days (Monday through Saturday) will have the same values.

    ISO 8601 also defines the "Week date" which assigns a number to
    each week of the year (More examples can be found here).
    Unfortunately, when the first day of the year does not coincide
    with the beginning of the week (Monday in ISO's specification),
    the week will straddle over two years for which special rules
    are made.  A week belongs to the year which is more dominant
    (has four or more days in the week).  So, the first week of
    the year (W01) is defined as the week which contains the 4th day
    of January.  With this rule, up to three days at the beginning
    of the year and also up to three days at the end of the year
    the date may become a part of the previous calendar year or the
    next calendar year, respectively.  This may be a bit confusing,
    but that's the rule and we understand why it is necessary.
    
    The Week-of-the-year value is always described with the prefix, W
    followed by a two-digit decimal value (starting 01) which is
    referenced by the /$IWK$ keyword.

    E.g.   Fri, 2003-07-04  --->  2003-W27-5
           Sun, 2003-12-28  --->  2003-W52-7
           Mon, 2003-12-29  --->  2004-W01-1  == next year value
           Thu, 2004-01-01  --->  2004-W01-4
           Sat, 2005-01-01  --->  2004-W53-6  == prev year value

    For this irregularity in the year values, XXCOPY assignes the
    /$IIII$ (and /$II$ for the two-digit notation) to be used in
    the week-of-the-year context to differentiate it from the
    calendar year value (/$YYYY$ and /$YY$, respectively).


Q and A:

   Q:  Why T is in the list of punctuation characters?

   A:  T is a special punctuation character as an exception since
       our favorite standard, the ISO 8601 stipulates the use of T
       to connect the date part and the time part.

         /$YYYY-MM-DDTHH.NN.SS$ ---> 2003-07-04T13.05.30

       (Alas, the colon (:) character is not a legal character
        for a filename and the dots are used instead.)

       You may use @ as an alternative separator:
       
         /$YYYY-MM-DD@HH.NN.SS$ ---> 2003-07-04@13.05.30

   Q:  Is there any way to test exactly how my macro usage is working?

   A:  If you are not sure of the effect of a macro, add the
       /EC (echo) switch that displays the full command line
       after the macro references are expanded.

       Example:

          XXCOPY  \src  \dst\/$DATE$\/$YYMMDD$\  /EC /W

          Here, the /EC gives you the line after the macro expansion,
          and /W will pause and let you terminate the command if you
          don't like the effect of the macro.


   Q:  Why the slash (/) is used in the macro prefix?

   A:  We wish we have more characters in the keyboard.  Seriously,
       the design goal of the XXCOPY Macro feature was to allow you
       to use it in as many places as possible (within the source and
       destination specifiers, as well as in other switch parameters).
       Since the macro reference should be anywhere (including a
       partial word), the macro syntax has to use a terminator (hence,
       the $xxxx$ sandwich).  Because the dollar sign ($) is a valid
       character for filename, we need a prefix character which is
       not permitted in filename.  Actually, there are only nine
       such characters in English alphabet ( " * ? : < > | \ / ) that
       are not permitted in Windows' filename.

       Every one of these character has some form of conflict with
       other usages.

         "  *  ?  \ are out of the question.
         <  >  |  are reserved by the command shell (COMMAND.COM).

         :  used only at the drive letter designator.
         /  used as the prefix for the command switch.

       So the choice was between the two (: and /).  We chose the
       two-character sequence, "/$" of the macro reference as a
       distinguishing feature from other switches.  Fortunately,
       XXCOPY's command syntax stipulates that the source and destination
       specifiers to be always separated from other switch arguments by
       a space, therefore, a macro reference embedded inside source or
       destination specifier can unambiguously parsed.  It's not pretty.
       It took us several months to settle on this syntax.  Now the
       journey is over.  Enjoy the macro.



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #25



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: XXCOPY Command Line Syntax
Date:    2002-05-07 (revised)
====================================================================

Basic Command Parameter Syntax:

  XXCOPY   source   destination    (simplified syntax)

  In its simplest form, XXCOPY takes two parameters,

      from WHERE to WHERE

  This very intuitive command syntax has its root in the COPY command
  introduced in 1981 as a PC-DOS (MS-DOS) built-in command.

  The first parameter is the source specifier and the second one is
  the destination specifier.  These two parameters must be in this
  order.  As common to the COPY and XCOPY command syntax, the
  destination specifier can be omitted.  Then, by default, the
  current directory in the current drive becomes the destination.

  XXCOPY   source  [ destination ]

  By convention, an optional parameter is denoted in the syntax
  definition with a pair of square-brackets surrounding it.
  In addition, you may add command switches that starts with a
  slash (see below).


The Command Line Delimiter:

  XXCOPY   source  [ destination ]  [ switches... ]

  These up to three (or more) parts must be separated by at least one
  blank (usually the space character but a tab may be used).  The role
  of the blank character as a separator (which is called "delimiter")
  in the command line is very important.  XXCOPY relies on the
  separating blank characters to know where the end of the source
  specifier and where is the beginning of the destination specifier.
  For this reason, if you have a source specifier (such as "My Documents")
  which has a space inside, you must enclose the whole source specifier
  by double quotes.

     Example:

       XXCOPY  "C:\My Documents\"

  If you omit the double quotes, like the following line,

       XXCOPY  C:\My Documents

  XXCOPY would interpret "C:\My" as the source specifier and "Documents"
  as the destination (If you have another item which you really meant
  as your destination, it would be ignored as a third and useless item).
  It does not hurt to surround the source (or destination) specifier by
  double quotes.


Full Command Parameter Syntax:

  XXCOPY   source  [ destination ]  [ switches... ]

  All switches start with a slash (/) character whereas the source
  and the destination specifiers do not have the slash(/) prefix.
  The source and the destination specifiers must be separated from
  other items in the command line by at least one blank (space or tab)
  character.  On the other hand, you may omit blank characters between
  switches in order to minimize the total length of the command line.

  Example:

     XXCOPY  C:\mydir\   D:\yourdir\   /S/H

     Here, "C:\mydir\"  is the source specifier and "D:\yourdir\" is
     the destination specifier.  They do not start with a slash (/).
     It has two (/S and /H) switches.

  Note that the positions of the switches need not be at the end
  of the command line.  Switches may begin even before the source
  specifier.  The following command line is equivalent to the one
  shown above.
  
      XXCOPY /S  C:\mydir\  /H  D:\yourdir\
  
  The order of the switches is not generally important except when
  a conflicting switches are specified, the rightmost switch will
  prevail.  More rules for special cases are discussed at the end
  of this article.  For a complete syntax and semantics for the
  source specifier, see XXTB #04.

  Once you learn this simple rule, it is quite easy to understand a
  long XXCOPY command line.


XXCOPY switches:

  A command switch (we call it just switch most often) is any command
  paremeter that is neither the source specifier (referred to as
  "source" above) nor the destination specifier (referred to as
  "destination" above).  A switch instructs XXCOPY the details of
  the operation which deviates the default behavior.  As a matter of
  fact, without the switches, XXCOPY is only as boring as the standard
  COPY command.

  For example,

      XXCOPY c:\mydir\  d:\yourdir\

  This line copies the files from one directory to another.  Since
  the default behavior is not to include hidden or system files, and
  not to include subdirectories, this operation will copy just a handful
  of regular files.  If the destination already has some of the files
  you will be greeted by a prompt asking whether you want to overwrite
  the file or not.  Moreover, if the existing file has the read-only
  attribute (i.e., write-protected), you are out of luck.

  The rich set of command switches set XXCOPY apart from other file
  management tools.  Being a command line program, XXCOPY is not
  easy to use.  You have no choice but to become familiar with the
  very large collection of switches (over 175 switches and growing),
  if you want to harness the power of XXCOPY.  The good news is that
  you need not learn all.

  Syntactically, all of XXCOPY's command switches starts with a slash
  ( /  some people call it forward-slash).  To keep the command line
  somewhat more manageable, XXCOPY allows you to connect one command
  switch with the next without any delimiting character (typically
  a space).  With just one exception (XXTB #24), an item that starts
  with a slash is a command switch.

  For more discussion of XXCOPY command switches and the detailed
  discussion of the source specifier, see the following

      for Command Parameter Reference                  XXTB #01
      for Command Reference Alphabetic Listing         XXTB #26
      for Command Reference Functional Classification  XXTB #27
      for The Wild-Wild-Source Specifier               XXTB #28

 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =


Source Specifier (XCOPY-compatible standard):

  XXCOPY's first argument (without regard to command switches) is
  the source specifier.  The source specifier is usually a path
  specifier for the source.  But, for Microsoft's XCOPY (and also for
  our XXCOPY), the source specifier may contain the directory and
  an optional file pattern specification whose subtleties are not
  fully appreciated by many XXCOPY users.

  The XCOPY-compatible source specifier has three parts:

     [ volume_spec ] [ directory ] [ file_pattern ]


  Example (the destination specifier is omitted here):

     XXCOPY    c:\mydir\*.doc
     XXCOPY    \\myserver\drivec\config.sys


  Here, the three parts in the XCOPY-compatible source specifier
  are quite obvious.  The second example is with the UNC which is
  how you specify a remote drive (via a network).

    volume_spec

      In most cases, the volume spec is a drive letter followed by a
      colon (e.g., C: ).  But, it can be a universal naming convention
      (UNC) string for a volume in a network (e.g., \\myserver\drivec ).
      If you omit volume_spec, the current drive is assumed.

    directory

      The name of the source directory.  When the XXCOPY command
      contains the subdirectory switch (/S and/or /E), the directory
      specifier denotes the starting directory where the source
      files and subdirectories are located.  The XCOPY-comatible
      directory part does not contain a wildcard character.  The
      more advanced "Wild-wild-source" feature in XXCOPY accepts
      wildcards.  For example,

          XXCOPY  C:\Windows\*\?cache*\*\*.jpg  \dst\

      A separate article, XXTB #28 gives you the full detail.

    pattern

      The last part within the source specifier denotes the pattern
      matching string which may contain wildcard characters (* or ?).
      It matches only the last components within a full filename.


Destination Specifier:

  Just to make the discussion of XXCOPY's command parameter syntax
  complete, let us go over the subject of the remajing item, the
  destination specifier.  Fortunately the rules for this are not
  complicated.  The destination specifier has two parts:

     [ volume_spec ] [ dest_dir ]

    volume_spec

      As for the source specifier case, the destination may contain
      a volume specifier (e.g.,  C: ).  If it is omitted, the volume
      of the current directory will be used.

    dest_dir

      The name of the destination directory.  Here, the destination
      must be a directory name (which may or may not yet exist
      in the destination volume).  Unlike the original COPY command,
      you are not allowed to specify wildcard characters in the
      destination specifier which would be conveniently used to
      perform renaming action while copying the files.

      XXCOPY does not rename files while they are copied. therefore,
      no wildcard characters have no place in dest_dir.

  Unlike the source specifier counterpart, the destination specifier
  consists of only two parts both of which are optional.  When you
  omit both of them, then the command line would have no explicit
  argument as the destination specifier.  Don't worry, the current
  directory will be used as the default destination directory.  Or,
  you may just type "." which denotes the current directory explicitly.


The Base Directory:

  When a directory (and the subdirectories) is copied from the
  source to the destination, the first level of the source directory
  will correspond to the first level of the destination directory
  that is specified as the destination.  We call the first level in
  the source directory the "Base Directory".  Since the destination's
  first level directory is named by the destination specifier that
  you provide in the command line, the directory name in the destination
  is not always the same.

  For example, when you run the following command,

     XXCOPY  c:\mypath\mysrcdir\   d:\your\dstdir\  /S

  Any part of the Base Directory is not necessarily become a part
  of the destination directory.  This is true even the last name
  (mysrcdir) does not automatically appear in the destination side.
  The end result will be like this.

     c:\mypath\mysrcdir\file1.doc   --> d:\your\dstdir\file1.doc
     c:\mypath\mysrcdir\sub1\a.doc  --> d:\your\dstdir\sub1\a.doc

  Here, the Base Directory is c:\mypath\mysrcdir\.  The concept of
  the Base Directory is even more important in the treatment of the
  exclusion parameter.  When an exclusion item is given as a relative
  path, the directory path specified is relative to the Base Directory.

  For example, with the same directory

     XXCOPY  c:\mypath\mysrcdir\   d:\your\dstdir\  /S /Xtemp*\

  The exclusion switch's parameter (temp*\) is understood to be
  relative to the Base Directory which is in this case:

     c:\mypath\mysrcdir\temp*\

  Of course, you may always use an absolute path for the /X parameter:

     XXCOPY c:\mypath\mysrcdir\ \dst\ /S /Xc:\mypath\mysrcdir\temp*\

  A more rigorous definition of Base Directory will be given in the
  discussion of the source directory which contain wildcards
  (Wild-Wild-Source)  XXTB #28.



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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:    2003-05-01  Revised for ver 2.84.2
====================================================================

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.

         /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 XXCOPY is done.

  /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 attribute 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 /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 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  Undo any of /BI, /BB, /BN, /Bo, /BX, or /BZ switches.

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

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

    /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

        /CL  Legacy switch, replaced by /CA

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

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

       /CB0  Cancels the /CB and /CBQ switches.

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

 /CF<fname>  Specifies a Command File which provides text as if it were typed
             at the positoin 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
                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 and L are both missing, L is used by default.

             Note: /L/FM<items> can be combined into a /L<items> switch.


        /FR  Legacy switch; replaced by /FF-2.

        /FT  Legacy switch; replaced by /FF+2.

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

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

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

         /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 read-only (same as /KS).

        /K0  Keeps the source attributes except read-only (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.

         /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
                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 and L are both missing, L is used by default.

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

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

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

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

     /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 /oD /oE /oF /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).

        /PC  Prompts you before creating new files.

       /PC0  Suppresses warning on file-creation.

        /PD  Prompts you before starting each directory with options for...
             Y (Yes), N (No), A (All), R (Remaining dirs), S (This & subdirs).

       /PD0  Suppresses the prompt before a destructive processing of directory.

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

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

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

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

     /SZ<n>  Legacy switch; replaced by /TR<n>.

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

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

      Note:  The /TR<n> switch replaces the legacy /SZ<n> switch.

         /U  Updates the files that already exist in destination.

 /UNINSTALL  Uninstalls XXCOPY from your computer.

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

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

        /WV  Prompts with a warning for an untested OS environment (default).

       /WV0  Suppresses warning for an untested OS environment.

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

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

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

  /$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
 /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
 /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 2003
Pixelab, Inc. All rights reserved.

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


XXCOPY
[ 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:    2003-05-01  Revised for ver 2.84.2
====================================================================

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)    /RC
      1.3        Remove                    /RS  /RD  /RX   /RMDIR
      1.4        Modify-Attributes         /AA  /AZ  /ANxx /ARxx /ASxx
      1.5        SFN/LFN adjustment        /NL  /NS
      1.6        Installation and license  /INSTALL  /LICENSE
     (1.7)      (List/Find                 /L  )        see 3.1

   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
          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   /A   /M  /AT /AX

      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 /DS /DX
          2.3.3     by File Size           /BZE /BZS /BZL /BLX
          2.3.4     by Combination         /BI  /BE  /BS  /BU  /CLONE

   3. Action Modifiers

      3.1   Console Output                 /EC /ZS /Q  /F  /L
      3.2   Screen and Log output control  /oDx/oEx/oFx/oIx/oPx/oSx/oXx
      3.3   Log File and List File         /oA /oN /Fo /FM
      3.4   Subdirectories                 /S  /E  /T  /ED /DL
      3.5   File Gathering                 /SG /SGF/SGN/SGo
      3.6   Directory Flattening           /SL /SR /SX /SLR/SRR/SXR
      3.7   File Name Treatments           /NX /NX0/N  /NP /ND /NW
      3.8   File Name Case Control         /NC0/NCL/NCU/NCX
      3.9   File Time Treatments           /FA /FC /FL /FU /FW /FF
      3.10  Timestamp Control              /TTA/TCA/TCC/TCW
      3.11  Time Zone Adjustments          /TD /TS
      3.12  File Attributes                /AC /R  /K  /KD /KN /KS
      3.13  Limiting the Size in Copying   /TR
      3.14  File Removal                   /Z  /ZY /RC /RS /RD /RX
      3.15  Quota on File Operation        /QF /QBL/QBT/QSL/QST
      3.16  Verify After Copy              /V  /V0 /V1 /V2 /VE
      3.17  Cyclic Copy Handling           /CC /CC0 /CCY
      3.18  Security Information           /SC /SF
      3.19  Checking Remaining Space       /CK /CK0
      3.20  Prompt Control                 /YY/I/W/WS/WE/P/PC/PN/Po/Y/PD/PZ/WD/WV/ZY/RxY/CCY
      3.21  Progress Bar                   /PB
      3.22  List Tree                      /LTREE
      3.23  Error Handling                 /C  /CB /CBQ/CR /CE
      3.24  Check Condition                    /IA /IP /ILS /ILD
      3.25  Debug and Test                 /DEBUG /DEBUGX
      3.26  Cache Control                  /CA
      3.27  Miscellaneous                  /ER /NI /SP /MD
      3.28  Help                           /?  /HELP /HELPA /HELPE
      3.29  DATMAN-Specific Features       /J  /0 /1 /G 

   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)

         /RCx      This is a variation of the Remove command group.
                   This function performs a regular copy operation
                   which is followed by a file remove operation if
                   the copying step is successful.  The net effect
                   of this operation is equivalent of moving the
                   file from the source to the destination.

   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.

   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.


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 (AHSR).
             /AX<mask>  Excludes files with the specified attribute bits (AHSR).
             /A0        Ignores the archive attribute bit and does not change it.


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

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

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.1   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.
      /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.2  Screen and Log File output control

      /oDn    Deleted-file list (by a /Z or /ZY switch).
      /oEn    Error summary with the system error code.
      /oFn    File list (files that are successfully operated on).
      /oIn    Include-item list.
      /oPn    Parameter (command switch detailed list).
      /oSn    Skipped-file list (with the reason for skip).
      /oXn    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.3  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

   3.4   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.5   File Gathering

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

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

   3.7   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 (default in XXCOPY16).
      /NW     Uses the new (Win32) wildcard treatment (default in XXCOPY).

   3.8   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.9   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.
      /FR     Legacy switch (replaced by /FF+2).
      /FT     Legacy switch (replaced by /FF-2).

   3.8   Timestamp Control

      /TTA    Touches (modifies) timestamp of Last Access of src.
      /TTA0   Preserves timestamp of Last Access of src (default).
      /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.9   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.12  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.13  Limiting the File Size in Copying.

      /TR<n>  Truncates the newly copied files (first n bytes are copied).
      /SZ<n>  Legacy switch (replaced by /TR).

   3.14  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.15  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.16  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 (DATMAN 2-pass).
      /VE     Displays only error cases of DATMAN 2-pass verify (/V2).

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

   3.18  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.19  Checking Remaining Space

      /CK     Checks remaining space before copy (default).
      /CK0    Disables the pre-check of remaining space before copy.

   3.20  Prompt Control

      /YY     Suppresses ALL prompts unconditionally (good in batch file).
      /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).
      /WS     Prompts you to press a key at the start of copying.
      /WE     Prompts you to press a key at the end of copying.
      /W0     Cancels the /W, /WS, or /WE switch.

      /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.
      /Po     Prompts you before overwriting an existing file (same as /Y0).
      /Po0    Overwrites an existing file without prompting (same as /Y).
      /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).

      /PD     Prompts you on a directory (default on destructive operations).
      /PD0    Suppresses the warning generated by the /PD setting.
      /PZ     Prompts for confirmation of dst directory on /Z /ZY /CLONE.
      /PZ0    Suppresses prompt for directory confirmation on /CLONE /Z /ZY.
      /PN     Prompts when on excessive failures on /NX operations.
      /PN0    Suppresses prompts on excessive failures of /NX operations.
      /WD     Warns you when a root-level directory is missing (default).
      /WD0    Suppresses the warning generated by the /WD setting.
      /WV     Warns you when one of the system DLL file is newer than XXCOPY (default).
      /WV0    Suppresses the warning for a newer system DLL with /WV setting.

      /ZY     /Z  action without the warning on file delete.
      /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.

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

   3.22  List Tree

      /LTREE  Lists directory tree (without copy or making directories).
              Note: with /LTREE, the /DA/DB/DO parameters apply on dir time.

   3.23  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.24  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.25  Debug and Test

      /DEBUG  Shows the command parameters and prompts you to start.
      /DEBUGX Exits immediately after showing the command parameters.

   3.26  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.27  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.28  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.29  DATMAN-Specific Features

      /J<n>   Forces DATMAN catalog (journal) flush.
      /0      Disables DATMAN One-pass copy (not recommended, but allowed).
      /1      DATMAN One-pass copy (when copying from DATMAN tape, default).
      /G<n>   Sets DATMAN N-Group (redundant) write. (<n> : 0 - 7).


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".
      /$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 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #28



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: The Wild-Wild-Source: the source spec with wildcards
Date:    2001-01-28
====================================================================

XXCOPY Command Parameter Syntax:

  XXCOPY   source  [ destination ]  [ switches... ]

  We have shown XXCOPY's basic command line syntax at numerous
  occasions.  In this article, the topic is focused on the first
  item, the source specifier (any of the switch arguments can be
  placed anywhere including at the position left to the source).


Source Specifier (XCOPY-compatible standard):

  In another article, XXTB #25, the standard source
  specifier that is compatible with Microsoft's XCOPY is discussed.
  The standard source specifier is made of the following three parts.

      [ volume_spec ] [ directory ] [ file_pattern ]

  The other article discussed the case where the directory specifier
  contains no wildcard character because Microsoft's XCOPY will treat
  them literally (the * and ? has no special power as wildcard).

  On the other hand, wildcard characters in the source specifier are
  handled more appropriately by XXCOPY which is the subject of this
  article.


The Wild-Wild-Source Specifier (XXCOPY-extended feature):

  This is one of the most distinguishing feature of XXCOPY from most
  other file management utilities.  The source directory specifier
  can be further separated in two sub-parts (compare with the standard,
  three-part source specifier).

   [ volume_spec ] [ base_dir ] [ directory_pattern ] [ file_pattern ]

  The [ directory ] component in the standard specifier is now broken
  up to [ base_dir ] and [ directory_pattern ].  The "constant" part
  of the directory specifier which has no wildcard will be classfied
  as the base_dir.  The remaining part that include a wildcard will
  be classified as the directory_pattern.  Any of the four parts can
  be omitted. But, of course at least one must be present as the
  source specifier.

  For example

      XCOPY   C:\Windows\sys*\*.dll   D:\dst\   /S

  According to the standard three-part scheme, it breaks up like

      volume_spec:          C:
      directory:            \Windows\sys*\
      file_pattern:         *.dll

  Of course, with Microsoft's XCOPY, you get nothing by this command.
  XCOPY looks for a directory, C:\Window\sys*\ which does not exist if
  interpreted literally (XCOPY does just that) and find no matching
  files (*.DLL).

  With XXCOPY's wild-wild-source (four-part scheme) feature, it works as.

      XCOPY   C:\Windows\sys*\*.dll   D:\dst\   /S

      volume_spec:          C:
      base_dir:             \Windows\
      directory_pattern:    sys*\
      file_pattern:         *.dll

      The command line effectively combines the action previously done
      with multiple lines like

      XXCOPY  C:\windows\system\*.dll    d:\dst\system\  /S
      XXCOPY  C:\windows\system32\*.dll  d:\dst\system\  /S
      ...


The Multi-level Subdirectory Specifier:

  In various examples, you may have seen a source specifier like

      XXCOPY  C:\Windows\*\?cache*\*\*.jpg  \dst\

  Yes, XXCOPY's unique Wild-Wild-Source feature allows you to use
  wildcards liberally pretty much anywhere in the source specifier.
  That includes the new \*\ notation where a single asterisk forms
  a sole level of directory.  You can go really wild with this
  feature of having as many wildcards anywhere, any level, any
  number...  It makes XXCOPY a very wild beast indeed.

  The \*\ sequence is a new notation which we came up with XXCOPY
  in order to encode the multi-level directory name matching.
  Actually, the same concept has been present in Microsoft's XCOPY
  in the form of the /S switch which specifies that a filename
  pattern be applied to multiple-level subdirectories.  For example,

     XCOPY   C:\Windows\*.jpg  \dst\  /S
     XXCOPY  C:\Windows\*.jpg  \dst\  /S

  The /S switch is a very basic switch and most XCOPY/XXCOPY users
  are familiar with this concept.  It includes not only the first
  level directory, but also includes all subdirectories.

       C:\Windows\mywife.jpg             // first-level directory
       C:\Windows\cache\mother1.jpg      // another-level
       C:\Windows\cache\deep\son.jpg     // third-level
      ...

  * * * *  OK, Microsoft's XCOPY runs out of gas here. * * * *

  The rest of the discussion applies only to the XXCOPY utility.
  Using the new \*\ notation, the /S switch can be substituted as

     XXCOPY  C:\Windows\*\*.jpg  \dst\

     In this command line, the \*\ sequence immediately before the
     filename template (*.jpg) makes the files to be applied to all
     subdirectories beyond the path (C:\Windows\).  Therefore, the
     *.jpg pattern applies to any subdirectories which is how the
     /S switch works.

  Next, I will show you even a better example of \*\ sequence which
  illustrates a case which cannot be specified by the traditional /S
  switch.

     XXCOPY  C:\Windows\*\cache\*.jpg  \dst\

     In this case, the subdirectory cache may appear at any level
     of subdirectory (including the first level).  Somewhat similar
     to the spirit of the /S switch, but it does NOT allow the
     last name part (*.jpg) to be matched in any other directory
     level than the one immediately inside the cache\ directory.
     Note the difference carefully:  the \*\ sequence does not
     appear between \cache\ and *.jpg.

  Therefore,the following three cases are all different one another.

     XXCOPY  C:\Windows\*\*.jpg           \dst\
     XXCOPY  C:\Windows\*\cache\*.jpg     \dst\
     XXCOPY  C:\Windows\*\cache\*\*.jpg   \dst\

     The first line is equivalent to the familiar /S switch where
     file pattern *.jpg applies to any level below C:\Windows\.

     In the case of the second line, \*\ modifies the multi-level
     matching of only the directory pattern, \cache\ (it just happens
     that it contains no wildcard charcter, but it may be allowed).
     But, the filename pattern, *.jpg applied only to the immediate
     directory of whichever \cache\ directory.

     The third case is the most universal case of all: the \*\
     sequence appears in both before the directory pattern, \cache\,
     and before the filename pattern, *.jpg.

     Here are some variations of the multi-level directory specifier:

        \*\         // zero or more levels of subdirectory
        \?*\        // exactly one level of subdirectory of any name
        \*\?*\      // one or more levels of subdirectory

     There are no particular limit that is set by XXCOPY.  You may
     use as many wildcars you want in the source specifier.  Of
     course, there is a practical limit in the whole length of the
     source specifier (260 character in all for a full pathname in
     Windows).


Just for old-timer's finger habit:

  For backward compatibility mostly to accommodate old timers' finger
  habit, Microsoft allows *.* to denote any file (or directory) name
  which may not necessarily has the dot character in it.  To honor
  the same tradition (and to make it fully XCOPY-compatible), XXCOPY
  accepts *.* as equivalent to the simpler (and preferred) single-
  asterisk, *.  To be symmetrical, the multi-level subdirectory
  matching sequence \*\ may be substitued by \*.*\.  Similarly,
  \*\*\ (or even \*\*\*\*) is a redundant (but permissible) expression
  which will be treated as equivant to \*\,


What is the "Base Directory":

  We call the "constant" part of the source directory in an XXCOPY
  operation the Base Directory.  There is always only one Base
  Directory in XXCOPY command.  In the traditional XCOPY-compatible
  (without wildcard) source directory specifier, the pathname up to
  the last name (the file_pattern) was the Base Directory.  With
  wildcard specifiers in the source specifier, the Base Directory
  refers to the first part of the source specifier which does not
  contain any wildcard character.  This is why there is always only
  one Base Directory.

  The distinction of the Base Directory from the directory_pattern is
  significant not for the name's sake.  But, it is the directory
  level which is the bas directory to which a relative path is
  referenced.  The Base Directory is used in both the formation of
  the destination directory and the referece point for an exclusion
  (/X) directory.

  For example, using the same command line showen earlier:

     XXCOPY   C:\Windows\*\*cache*\*.jpg   D:\dst\  /I

  In the destination directory, you will find files like...

     C:\Windows\abc\mycache\xrated.jpg --> D:\dst\abc\mycache\xrated.jpg
     C:\Windows\a\b\cachex\xxx_pic.jpg --> D:\dst\a\b\cachex\xxx_pic.jpg
     C:\Windows\cache\pta_oked.jpg     --> D:\dst\cache\pta_oked.jpg

     (The /I switch let a new directory to be created if missing).

  The Base Directory in this case is the

      C:\Windows\

  which is the longest source directory path which does not contain
  a wildcard.  So, if you have a relative referece in an exclusion
  switch, the path will will be relative to the Base directory.

  For instance,

     XXCOPY  C:\Windows\*\*cache*\*.jpg   D:\dst\  /Xcache*\

     Here, the exclusion specifier (/Xcache*\) gives the pattern for
     the directories to be excluded as "cache*\" which is relative to
     the Base Directory.  that is C:\Windows\cache*\.  And the line

     XXCOPY  C:\Windows\*\*cache*\*.jpg  D:\dst\  /XC:\Windows\cache*\

     In the above example, the following file would be caught by the
     exclusion specifier.

     C:\Windows\cache\pta_oked.jpg


Does the Wild-Wild-Source scheme apply to the exclude swich?

  Unfortunately, the answer is NO.  The exclusion specifier is
  not implemted as flexibly as that of the source directory
  specifier.  It is mostly the for the sake of reasonable issue.
  If the exclusion specifiers are given a total freedom in terms of
  the placement of wildcard characters just like the source
  specifier, unless we come up with a very clever algorithm,
  the combinatorial explosion will be so severe, the operation
  will be intorelably slow it will not be useful --- that is
  our official excuse at least.  On the other hand, the current
  set of exclusion feature is chosen in such a way that the
  overall XXCOPY performance will not severely compromized even
  by a very large number of exclusion specifiers.   Currently,
  the use of wildcard in an excluded item is limited to the
  last name (either file or directory) portion of the specifier.



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #29



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: The Windows 98 Startup Disk
Date:    2001-02-08
====================================================================

This article discusses the use of the Windows 98 startup floppy disk
and an alternative boot disk to handle troubles in booting up the
Windows 98 system.  Most of the discussion here apply equally to
the Windows 95 and Windows ME operating systems (OS) but there are
minor differences from one OS to another.

The Windows Startup Disk:

    If you do not have the Startup Disk for your Windows 98 (or you
    have misplaced it since you made it when you installed Windows 9x
    on your system), this is the time to make one.

    It is conveniently done from Control Panel.

      Control_Panel > Add/Remove Programs >Startup Disk

    A surprising number of users don't have the startup disk handy and
    even those who have it have never used it, or do not know what it
    is for and how useful it is.  If you have done it recently, you may
    remember that the Windows 9x installation steps always provide the
    option of creating such a diskette --- but never explains how to
    use it.


What's on the Startup Disk?

    The diskette is also called Emergency Boot Disk (EBD) is a replica
    of the contents of the directory at C:\WINDOWS\COMMAND\EBD.
    (If you are not a techwiz, just skip the file list)

    IO.SYS           ; System boot file.
    MSDOS.SYS        ; Boot option information (paths, multiboot, and so on).
    DRVSPACE.BIN     ; Microsoft DriveSpace compression driver.
    CONFIG.SYS       ; Loads the device drivers.
    HIMEM.SYS        ; Extended (XMS) Memory Manager.
    COMMAND.COM      ; Command interpreter.
    AUTOEXEC.BAT     ; A batch file which runs when you boot it.
    ASPI2DOS.SYS     ; Real-mode Adaptec CD-ROM driver.
    ASPI4DOS.SYS     ; Real-mode Adaptec CD-ROM driver.
    ASPI8DOS.SYS     ; Real-mode Adaptec CD-ROM driver.
    ASPI8U2DOS.SYS   ; Real-mode Adaptec CD-ROM driver.
    ASPICD.SYS       ; Real-mode Adaptec CD-ROM driver.
    BTCDROM.SYS      ; Mylex/BusLogic CD-ROM driver.
    BTDOSM.SYS       ; Mylex/BusLogic CD-ROM driver.
    FLASHPT.SYS      ; Mylex/BusLogic CD-ROM driver.
    OAKCDROM.SYS     ; Generic device driver for ATAPI CD-ROM drives.
    SETRAMD.BAT      ; Searches for first available drive to be a Ramdrive.
    RAMDRIVE.SYS     ; Creates a Ramdrive during startup.
    FINDRAMD.EXE     ; Utility to find the RAM drive during startup.
    EXTRACT.EXE      ; File to expand the Ebd.cab file.
    FDISK.EXE        ; Disk partition tool.
    SYS.COM          ; System transfer tool.
    EBD.SYS          ; Disket identifier file (Windows 98 startup disk)
    MODE.COM         ; Lets you change console parameters
    README.TXT       ; Document file
    EDB.CAB          ; Cabinet (compressed) file containing the following
      ATTRIB.EXE     ; Add or remove file attributes.
      CHKDSK.EXE     ; Simpler and smaller disk status tool.
      DEBUG.EXE      ; Debug utility.
      EDIT.COM       ; Real-mode emergency text editor.
      EXT.EXE        ; File extract utility.
      FORMAT.COM     ; Disk format tool.
      HELP.BAT       ; Launches the readme.txt for the startup disk.
      HELP.TXT       ; Help text file.
      MSCDEX.EXE     ; Microsoft CD-ROM file extension for MS-DOS.
      RESTART.COM    ; Restart your computer.
      SCANDISK.EXE   ; Disk status tool.
      SCANDISK.INI   ; Disk status tool configuration file.
      SYS.COM        ; system transfer tool.
      UNINSTAL.EXE   ; Removes Win 98 and restores the previous state.


    The floppy disk is essentially a bare bones DOS 7.x system disk
    with various disk initialization tools, such as

      FDISK.EXE       FORMAT.COM      SYS.COM

    These tools allow you to initialize the hard disk prior to the
    Win 98 installation.  But, in order to read the Win 98 Installation
    CD-ROM for the setup procedure, you need the capability of
    accessing the CD-ROM which often needs SCSI device drivers.

      ASPI2DOS.SYS    ASPI4DOS.SYS    ASPI8DOS.SYS
      ASPI8U2DOS.SYS  ASPICD.SYS      BTCDROM.SYS
      BTDOSM.SYS      FLASHPT.SYS     OAKCDROM.SYS

    Surprisingly, there is no software in Startup Disk which allows
    you to start Windows 98.  The tools are good mostly to re-install
    the Windows 98 operating system from the CD-ROM.  Although the
    Win 98 re-installation procedure would not normally delete user
    files on the hard disk, it is a very time-consuming process.

    It should be pointed out that on many occasions, there are steps
    you can take that are much quicker to make the system disk capable
    of rebooting into Win 98 system without a complete re-installation
    of the OS.  But, the Startup Disk will not allow you to do so.


The Master Boot Record (MBR):

    Every now and then, a Windows 9x system becomes unbootable for
    various reasons.  The most common cause is probably the contents
    of the master boot record (MBR) of the boot drive (the first
    disk drive that is enabled) are not configured properly.  FDISK
    is the official tool to manipulate the contents of the MBR in
    Microsoft's OSes.

    The most well known "undocumented" feature (even Microsoft's page
    documents it) is to refresh the MBR by the following command.

        FDISK  /MBR

    This command runs very quickly without fanfare: it does not
    even tell you whether or not the operation was successful.

    Also, it is a good idea to run FDISK (without arguments)
    and examine the first disk to make sure the first partition
    is a Primary DOS Partition and it is set as Active Partition.
    It is unfortuante that FDISK allows you to make only the
    Primary DOS parition of the first disk drive an Active partition.
    So, even if your BIOS configuration menu has a feature to allow
    you to set the disk volume other than C: as the boot volume,
    it does not do you any good as long as you use FDISK because
    it refuses to make any other partition active.


An Alternative Boot Disk:

    From time to time, for various reasons, the Windows 98 system disk
    gets slightly corrupted and becomes not bootable.  It take only one
    crucial file to make the system fail to boot successfully into
    the Windows 98 environment.  Anyway, it is very useful to have
    a bootable system diskette which allows you to not only boot into
    a DOS environment, but also reach all the way to the Windows 98
    environment even on a volume which cannot otherwise boot itself
    to the Win98 world.  Such a capability is sorely missing from the
    standard Win98 Startup Disk (a.k.a. EBD).

    Note: This technique works with Win98, but NOT on Win ME.


How to make the Alternative Boot Disk:

    Perform the following sequence to prepare the boot diskette
    from a command prompt (in DOS or in a DOS Box).

      FORMAT   A:  /U /S
      XXCOPY16 C:\MSDOS.SYS     A:\  /H/R/Y
      XXCOPY16 C:\CONFIG.SYS    A:\  /H
      ECHO     C:\AUTOEXEC.BAT >A:\AUTOEXEC.BAT

    Here, in this example, XXCOPY16 is used because it can be run
    either in the 16-bit or in the 32- bit environment.  But, you
    may use XXCOPY (the 32-bit version) in a DOX Box of Win9x.
    If XXCOPY/XXCOPY16 is not available, you need to perform extra
    steps (ATTRIB to manipulate the attribute bits first, and copy
    the file accordingly).  The forth line here is a quick way to
    make a one-line text file on A:.  Of course, you may add other
    utilities to the diskette such as FDISK.EXE, FORMAT.COM, SYS.COM
    for your convenience.

    If you are not familiar with XXCOPY16, it is available in the
    XXCOPY Freeware package.


Using the Alternative Boot Disk:

    This diskette allows you to boot into Win9x where the system
    disk at C: is not capable of booting itself.  This is usually
    a result of the partition that is assigned to C: is not an
    "Active" DOS Primary partition.


Additional note:

    This technique can be extended to a customized "multi-boot"
    scheme based on floppy disks.  For instance, I have a Japanese
    version of Win98SE which is installed on Drive E:.  That is,
    when the particular version was installed, it was deliberately
    installed to E: so that E:\WINDOWS is the official windows
    system directory for that environment.  According to Microsoft's
    official "rule", only one kind of Win9x OS can exist on a system,
    (the dual-boot is possible with WinNT/2000/XP but not with another
    Win9x or ME), when I need to boot into the Japanese version of
    Win98, I use a specially made diskette which has its own unique
    MSDOS.SYS file which declares that the E: drive is the boot drive.

    Of course, you may acquire a specialized boot control software
    such as the System Commander that allows even more flexible
    booting option among many OSes.  But, the alternative boot disk
    allows you to test the system and see which of the key files
    are causing a boot sequence problem.



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #30



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: Feature comparison: XXCOPY vs ROBOCOPY
Date:    2002-12-03   (Revised)
====================================================================


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



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #31



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: XXCOPY's Exit Code (for ERRORLEVEL checking)
Date:    2004-09-09  (revised)
====================================================================

Introduction:

  Upon the completion of execution, Windows (and DOS) programs return
  a 16-bit value (8-bit value in DOS) to the parent process.  XXCOPY
  (and XXCOPY16) is of no exception.  The value is usually referred
  to as Exit code which is also widely known as the ERRORLEVEL value
  in batch file programming.  Due to the DOS compatibility, the batch
  program can examine only the low order 8-bit value (0 - 255) for
  testing.  The exit code provides a mechanism to evaluate the result
  of the program execution which can be incorporated in a conditional
  branch operation (for IF ERRORLEVEL n GOTO ...).

  For related topics on batch file technique, see, XXTB #19.


XXCOPY's standard exit codes:

     Exit Code  Comment (in default mode with /ER0)
   ---------------------------------------------------------
         0     No error, Successful operation
        1-32   DATMAN software package error code
        33     Aborted by user
        34     Illegal command parameter
        35     Invalid DOS version
        36     The current directory is invalid
        37     Resident DATMAN wrong version
        38     Cannot create the destination directory
        40     Some fatal error has occurred
        41     Invalid source specifier
        42     Invalid destination specifier
        43     Invalid exclusion item specifier
        44     Disk Full
        45     Share violation error
        46     Conditional termination
        47     Path name exceeds the file system's limit
        48     Cannot overwrite read-only file
        49     Problem in network
       100     No files were found to copy
      101-254  # errors in file copy (1-154, biased by 100)
        255    # errors exceeding 154 files



XCOPY-compatible exit codes:

    Exit Code  Comment (in XCOPY-compatible mode with /ER)
   ---------------------------------------------------------
         0     No error, Successful operation
         1     No files were found to copy
         2     Aborted by user
         4     Disk Full, command syntax error, etc.
         5     Disk write error.


The Built-in Exit Code Help:

   The error code tables shown above are also available as a
   built-in Help text by running the following switch.

      XXCOPY /HELPE



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #32



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: A better boot diskette for Win9x/ME
Date:    2001-08-18
====================================================================

Introduction:

  One thing really annoying with Windows ME is that the "Start UP"
  diskette which WinME creates as part of the initial installation
  (the so-called Emergency Boot Disk, or EBD) is quite useless.

  It does not allow you to enter the windows ME environment at all.
  All it gives you is a pseudo DOS environment with/without the
  support of the CD-ROM drive (Oh, yes, it gives you a Help menu).

  It seems that when something goes wrong with the few key files
  in the root directory and/or the master boot record (MBR), the
  only option you have is to re-install the whole Windows ME.
  This is also true even with our favorate environment, Win98SE.

  There are times when you are installing another OS (sucha s
  Windows 2000 as a dual boot system and something goes wrong
  with the set up, or a virus attack.  The complicated steps in
  the boot up process, especially with a dual-boot system, if any
  of the many files are even slightly corrupted, you can't enter
  Windows 9X or ME.  With this regard, Windows ME was one step
  backward from Win 9x where at least you have a DOS environment
  where you can fix things and enter the Windows environment.


Enter the Quick Boot Diskette:

  Anyway, here's a technique that works quite well to enter the
  Windows 9x/ME world without using any file in the root directory
  of the C: drive.  The disketter you prepare with this technique
  is useful even for a dual-boot system (e.g., 98SE and XP) as
  long as the disk was installed with a Windows 9x/ME system. 

  It seems too simple to be true.

  Assume that you are running a healthy Win9x/ME system.
  Here's how to create the "Windows Quick Boot" diskette:

    1. Open a DOS Box inside Win9x/ME (or its DOS counterpart).
    2. FORMAT A:
    3. XXCOPY16  C:\IO.SYS    A:\   /H
    4. XXCOPY16  C:\MSDOS.SYS A:\   /H

  Note: if you don't have XXCOPY16, use the standard ATTIRB
  and COPY command to copy the hidden files.  The two files
  listed above are essential.  Optionally, you may copy the
  following files if they are present in the root directory
  (but not mandatory)

    5. XXCOPY16  C:\CONFIG.SYS A:\
    6. XXCOPY16  C:\AUTOEXEC.BAT A:\

  That is it!!! 

  The diskette is a bootable diskette which does not rely on any
  file in the root directory of the C: drive.

  If you are not familiar with XXCOPY16, it is available in the
  XXCOPY Freeware package.


The MSDOS.SYS file:

  Of course, the contents of the MSDOS.SYS file should be carefully
  controlled.  The following text shows a typical MSDOS.SYS fie. 
  (Note: the Windows 9x/ME system directory is assumed to be name
  as C:\WINDOWS.  If it is different, make adjustments as needed.)

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

     [Paths]
     WinDir=C:\WINDOWS
     WinBootDir=C:\WINDOWS
     HostWinBootDrv=C

     [Options]
     AutoScan=0
     BootDelay=0
     BootMulti=0
     BootGUI=1
     BootMenu=0
     BootMenuDefault=1
     BootMenuDelay=4
     DoubleBuffer=1
     Logo=0
     DblSpace=0
     DrvSpace=0
     DisableLog=1
     WinVer=4.90.3000
     ;
     ;The following lines are required for compatibility...
     ;Do not remove them (MSDOS.SYS needs to be >1024 bytes).
     ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
     ; ...

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

  The most important thing with the MSDOS.SYS file is that
  the copy in the diskette should have the following line in
  the [Options] section of the file.
         
      DisableLog=1

  If the line reads "DisableLog=0", then, the log file (BOOTLOG.TXT)
  will be created on the diskette which makes the boot up procedure
  painfully slow.  (In Win ME, the log file will be created only
  when you choose Safe Mode or manually select Logged mode.  Still,
  for the floppy based operation, you don't want the log file.)  

  Note:  If your windows directory is not "C:\WINDOWS",
	 make adjustments as needed.
 
	 Here, some non-default settings are chosen:
       
	 AutoScan=0   (1 to carry out ScanDisk)
	 Logo=0       (1 to hide the screen by the log image)
	 DisableLog=1 (0 to generate BOOTLOG.TXT)
	 DblSpace=0   (1 to load DBLSPACE.BIN automatically)
	 DrvSpace=0   (1 to load DRVSPACE.BIN automatically)

     The WinVer value should reflect the version of Windows:

	 WinVer=4.00.0950      // Windows 95            
	 WinVer=4.00.1111      // Windows 95 OSR2       
	 WinVer=4.10.1998      // Windows 98            
	 WinVer=4.10.2222      // Windows 98 SE         
	 WinVer=4.90.3000      // Windows ME            


In case of trouble:

  1.  With WinME, the Quick boot diskette should go right into
      the Windows screen without letting you to stay in DOS.
      This procedure does not use any of the files in the root
      directory of the system disk (C:).
      
      On the other hand, with Win9x (Non-ME), the boot menu gives
      you the familiar option to stay at the command prompt.

  2.  If your system is too corrupted to come back alive using
      the Quick-restart diskette, you should use the Windows
      Emergency Recovery diskette that you made in the installation
      step.

  3.  Run FDISK to make sure that the Master boot record (MBR)
      has the proper master boot code.
  
         FDISK /MBR      (it runs in non-interactive mode).   

      Then, run FDISK in interactive mode (without an argument)
      and from the FDISK menu, make sure that the Primary DOS
      Partition is active.

  4.  Run the SYS command to refresh the boot sector (the first
      sector of the active partition) has proper boot program.
  
         SYS C:

      This program initializes the boot sector of C: drive and
      also copies the IO.SYS, MSDOS.SYS and DRVSPACE.BIN files.

      Caution: If your system is configured as dual-boot with
      Windows NT/2000/XP, this procedure will make it Win9x-only
      system (However, after making it Win9X-only boot first,
      you may run the FIXBOOT command inside the Recovery Console,
      to make it dual-boot again).

  5.  If you suspect that the system registry settings (especially
      for essential device drivers) are badly configured, you
      may reestore the key files from the system backup directory.
      First, see how many backup sets have been captured.
      
        DIR  C:\WINDOWS\SYSBCKUP\*.CAB
     
      Here's an example of what you see:
   
        RB000    CAB     1,888,538  05-21-01  5:36a rb000.cab
        RB003    CAB     1,889,721  05-22-01  7:38a rb003.cab
        RBBAD    CAB     1,834,739  01-26-01  3:28p rbbad.cab
        RB002    CAB     1,892,943  05-20-01 12:45p rb002.cab
  
      Note that the file number and the file dates are not in
      a particular order.  Yesterday's copy is usually good.
      Don't pick the one with RBBAD.CAB which is a bad one!
      Once you decide which of the .CAB files to restore

      You may increase the number of backup sets stored in the
      SYSBCKUP directory by editing the C:\WINDOWS\SCANREG.INI
      file (e.g., specify MaxBackupCopies=10 for ten sets). 

   6. Once you decide which backup set to restore, run:
  
        EXTRACT C:\WINDOWS\SYSBCKUP\RB002.CAB /L C:\WINDOWS /E /Y

      Here, the RB002.CAB was chosen as an example. The directory
      name following the /L switch specifies the location of the
      the extracted files.  The /E switch extracts all files.
      The /Y switch suppresses the overwrite prompts. 

      In the case of Windows ME, the following files are expected
      to be restored:

           C:\WINDOWS\SYSTEM.DAT
           C:\WINDOWS\USER.DAT
           C:\WINDOWS\CLASSES.DAT
           C:\WINDOWS\WIN.INI
           C:\WINDOWS\SYSTEM.INI

   7. After the FDISK, SYS and EXTRACT procedures described above,
      you can try again with the Quick Boot diskette to reboot.
      Also, note that the files that are on the Quick Boot diskette
      were originally from the root directory of the system disk (C:).
      Therefore, you may restore them by copying the files back to
      the root directory if need:

          XXCOPY16 A:\*.*   C:\  /H /R /Y


Tip:

  Although the Quick Boot diskette needs only a handful of files,
  if you add the few utility programs into the diskette, it will
  make the diskette useful in case of trouble.

      IO.SYS        ; essential for boot up
      MSDOS.SYS     ; needed to boot up into the GUI environment
      CONFIG.SYS    ; optional for boot up
      AUTOEXEC.BAT  ; optional for boot up

      FDISK.EXE     ; to make the hard disk bootable
      SYS.COM       ; to make the hard disk bootable
      FORMAT.COM    ; to start over
      XXCOPY16.EXE  ; good idea
      XXCOPY.EXE    ; if you have room


Epilog:

  I have tested the technique described in this article using
  a computer with Win98, Win98SE and WinME.  I believe the same
  technique should work on Win95 and Win95-OSR2.

  Let me know if you encounter problems with the techniques
  described in this article. 

     Kan Yabumoto  

  For a similar technique in creating a better boot diskette for
  WinNT/2000/XP, see XXTB #33.


© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #33



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: A better boot diskette for WinNT/2000/XP
Date:    2003-03-05 (revised)
====================================================================

Introduction:

  The previous article, XXTB #32 shows a technique to create a
  quick boot disk which is convenient to start up a Win9x/ME system
  when it fails to enter the Windows environment because any of the
  master boot record (MBR), the boot sector, or the essential files
  in the root directory is missing or damaged.

  This article presents a similar technique for a Windows NT/2000/XP
  system which fails to boot up into the Windows environment.
  Again, the cause of the problem is typically in the MBR, the
  boot sector and/or a few key files in the root directory.

  When you install a Win9x/ME system on a Windows NT/2000/XP system,
  the capability of dual-boot is sometimes lost.  The standard
  procedure for such an occasion is to use the Emergency Repair Disk
  (ERD).  But it requires an in-depth understanding of the operating
  system environment.  It is not for everybody.  Besides, it is just
  too slow.


Enter the Quick Boot Diskette:

  Here's a simple procedure to create a Quick Boot diskette for
  WinNT/2000/XP.  It allows you to start up the Windows NT/2000/XP
  system with a minimum hassle in case of bootup trouble.

  Assume that you are running a healthy WinNT/2000/XP system.
  Here's how to create the "Windows Quick Boot" diskette:

    1. Open a DOS Box (Start > Run... > cmd).
    2. FORMAT A:
    3. XXCOPY16  C:\NTLDR          A:\   /H
    4. XXCOPY16  C:\NTDETECT.COM   A:\   /H
    5. XXCOPY16  C:\BOOT.INI       A:\

  Note: if you don't have XXCOPY16, use the standard ATTRIB
  and COPY command to copy the hidden files.  XXCOPY16 is a 16-bit
  version of the XXCOPY freeware utility that is available at
   http://www.xxcopy.com.

  The three files listed above (NTLDR, NTDETECT.COM, and BOOT.INI)
  are all essential.  Optionally, you may copy the following files
  if they are present in the root directory   (needed only when you
  need to boot into Win9x/ME as a dual-boot system)

    6. XXCOPY16  C:\BOOTSECT.DOS   A:\   /H
    7. XXCOPY16  C:\IO.SYS         A:\   /H
    8. XXCOPY16  C:\MSDOS.SYS      A:\   /H
    9. XXCOPY16  C:\CONFIG.SYS     A:\   /H
   10. XXCOPY16  C:\AUTOEXEC.BAT   A:\   /H

  If you have a Recovery Console entry in the menu, add the
  following two files.

   11. XXCOPY16  C:\CMDCONS\NTDETECT.COM  A:\CMDCONS\   /H
   12. XXCOPY16  C:\CMDCONS\BOOTSECT.DAT  A:\CMDCONS\   /H

  If you use a SCSI disk, you also need the SCSI driver
  
   13. XXCOPY16  C:\NTBOOTDD.SYS   A:\   /H


  That is it!!! 

  If you are not familiar with XXCOPY16, it is available in the
  XXCOPY Freeware package.

  The diskette is a bootable diskette which does not rely on any
  file in the root directory of the C: drive.

     ---------------------------------------------------------------
      Caution:  The FORMAT command in the Windows NT/2000/XP
                looks deceptively similar to the one which comes
                with a DOS/Win9x/ME system.  But, the boot
                sectors of the two types of diskette are different
                each other.
              
		The boot code of a DOS/Win9x/ME diskette loads
		and executes the IO.SYS file whereas that of a
		WinNT/2000/XP diskette is tied to the NTLDR file.

                If you use a pre-formatted diskette, you must
                initialize the diskette using the FORMAT command
                run in the NT/2000/XP environment as described
                above (don't have the absense of the /S switch
                in the FORMAT command fool you).  You must not
                skip the FORMAT step in this procedure.
     ---------------------------------------------------------------


     ---------------------------------------------------------------
      Note:     The BOOTSECT.DOS and \CMDCONS\BOOTSECT.DAT are
                specific to the particlar hard disk's drive
                dimension and cannot be shared with other drive.
                This dependency makes the WinXP Quick Boot Diskette
                specific to the drive.  If you have nearly identical
                disk drives on a different machine, you may use one
                Win9X Quick Boot Diskette on multiple machines as
                long as the BOOT.INI configurations are made
                sharable.
     ---------------------------------------------------------------
                

Customization:

  The initial bootup menu reflects the contents of the BOOT.INI
  file which you can edit by NotePad.  The following pages in
  Microsoft's web sites explains technical details of BOOT.INI.
  
     Contents of the boot.ini file
     Parameters for the boot.ini file  
will show you how to edit the file in order to customize the boot up procedure which is different from the disk-based bootup configuration. The version differentiation: If you have studied my previous article, XXTB #32, you will find many parallels in the DOS family (DOS/Win9x/ME) boot procedure and the NT family (WinNT/2000/XP) boot procedure. Unfortunately, this scheme does not work with XP. The MBR is universal whether it is for DOS, Win9x, WinNT, or even for Linux. On the other hand, once the boot up partition is selected the corresponding boot sector (the first sector of the partition) supplies a specific boot code which is either for the DOS family (DOS/Win9x/ME) or the NT family. In the DOS family, the first file loaded will be C:\IO.SYS which is Windows-version specific. That is, when a particular IO.SYS is loaded, it accepts only the proper version of Windows and fails to boot up with any other version. The next file looked at is C:\MSDOS.SYS which supplies the location of the Windows system directory. So, once the IO.SYS is loaded, you cannot choose Windows versions --- this is why it is difficult to have multiple-versions of DOS family OS to be loaded. On the other hand, in the NT family, the first file loaded will be NTLDR which is not version-specific. Therefore, you may select which version within the NT family to load (WinNT4 or Win2000). But if you mix NT versions, make sure that you use the NTLDR module which came from the newer version. That is, Win2000's NTLDR is good for NT4 but NT4's NTLDR cannot load Win2000. About the Recovery Console: The bare DOS environment is often useful in accessing files in partitions formatted in FAT. On the other hand, files in an NTFS partition cannot be accessed from DOS. When you have problem in an NTFS volume, the standard method to repair the disk is to load the Recovery Console. Even if you have a FAT-based system disk for an NT/2000/XP system, fixing the MBR and the boot sector needs the Recovery Console. After all, the Emergency Repair Disk (ERD) is useful only when you establish the Recovery Console (or the Emergency Repair Session). It is strongly advised that you should go through the Recovery Console at least once while your WinNT/2000/XP system is in good health. There are three ways to enter the Recovery Console: 1. Use the set of Setup Diskettes (4 floppies). This method is painfully slow. But, simplest to operate. 2. Use the original install CD-ROM and run /I386/WINNT.EXE (from DOS), or /I386/WINNT32.EXE (from Windows). If the Install CD is a bootable CD and your BIOS supports booting from the CD, this is faster. Even if your system cannot boot from the CD, if you have a Win9x Emergency Disk, it lets you configure a DOS environment with CD access so that you can launch the WINNT.EXE or WINNT32.EXE. Note, entering the Recovery Console uses the same setup procedure which is also used for a fresh WinNT/2000/XP install. Be assured that you will be given a menu to enter the Recovery Console instead of re-installing the whole OS from scratch. 3. Use the files in the C:\CMDCONS (hidden) directory which can be set up on your hard disk (while you have a healthy Win2000). As one of the boot options in the menu which are shown from entries in BOOT.INI, you can simply select the Recovery Console option at the boot up time. This is the quickest method of all. (We have tested this technique only with Win2000 --- but not with NT4.) We recommend the 3rd option as the most convenient method. Basically, all of the three alternatives use exactly the same set of files --- the difference is where these files are loaded from. In the third case, it consumes about 7 MB of disk space which is not much, today. Even in rare instances where your system fails to go far enough to show you the boot menu, you can use the Quick Boot Diskette to load the files in the C:\CMDCONS directory. Here's how to set up the C:\CMDCONS files. 1. Inside Windows 2000, run the following console command from the Install CD (assume it is accessed at D:) D:\I386\WINNT32.EXE /cmdcons This will create the C:\CMDCONS (hidden) directory and saves all the files which are neccessary for the Recovery Console. It also modifies the BOOT.INI file with an appropriate entry for the Recovery Console option. 2. Edit the BOOT.INI file in your Quick Boot Diskette by looking at the newly modified C:\BOOT.INI file on your hard disk. The line should look like the following: C:\CMDCONS\BOOTSECT.DAT="MS Win2000 Recovery Console" /cmdcons Note: In the above discussion, the system volume was assumed to be C:\ which can be another drive letter. Once you are in the Recovery Console, it is like the DOS world (many familiar commands such as DIR, MKDIR, CHDIR, COPY, are there). The long filename is also supported. You can even invoke a batch file (using a different syntax). Troubleshooting: If your system cannot boot up using the Quick Boot Diskette made by this technique, you still need to run the Emergency Repair Disk which is outside the scope of this article. The following Microsoft article may be a good starting point: "Description of the Windows 2000 Recovery Console". Let me know if you encounter problems with the techniques described in this article. Kan Yabumoto

© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #34



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: The differences between XXCOPY Pro and Freeware
Date:    2001-10-09
====================================================================

This article explains how XXCOPY Professional Edition (XXCOPY-PRO)
differs from the XXCOPY Freeware which are available for free.

Currently practically all XXCOPY-Pro features are available
in the XXCOPY Freeware version except that in some circumstances,
the Freeware version displays a message which requires a user
response.  


1. Accessing remote computers (networked computers), beyond the
   number of computers for which your license allows.

     XXCOPY version               // Host count (# of computers) 
    --------------------------------------------------------------
     XXCOPY Freeware              // 1 (the local computers only)
     XXCOPY-PRO (TestDrive)       // 100 = 99 networked computers
     XXCOPY-PRO (for N computers) // N =  (N-1) networked computers

2. Macro references

     /$DATE$    // Current Date (same as /$MMDD$)
     /$TIME$    // Current Time
     /$YYMMDD$  // Any combination of YYYY, MM, DD, HH, NN, SS
     /$xxxxxx$  // And many more
     /%xxxxxx%  // Reference to environment variable from /CF

3. Security related features (available in NT/2000/XP platforms)

     /SC        // Copy security info when a file is copied
     /SF        // Fixup security info, without copying file

4. Non-default log output

     /oP        // Parameter
     /oP        // Parameter (command switch detailed) list.
     /oI        // Include-item (alternate file template) list.
     /oX        // Exclude-item list.
     /oF        // File list (files which were successfully operated on).
     /oS        // Skipped-file list (with the reason why skipped).
     /oD        // Deleted-file list (by a /Z or /ZY switch).
     /oE        // Error summary with the system error code

5. Miscellaneous advanced features

     /FD        // Inter-timezone (adjust the destination timestamp)
     /FS        // Inter-timezone (adjust the source timestamp)

6. Warning on an untested OS environment

     XXCOPY Freeware        // Always a warning is displayed
     XXCOPY-PRO (TestDrive) // The OS-version warning may be suppressed

7.  Other occasions

     XXCOPY Freeware  // You may see occasional user prompts
     XXCOPY-PRO       // Practically all prompts can be suppressed.


The above list is a description of difference between the two
XXCOPY packages as of this writing (v.2.60.0 for the official
release version and v.2.71.0 for beta test version).

In the future, more differences may occur as we implement more
features which are primarily for the XXCOPY Professional Edition.


We guarantee that the XXCOPY-PRO version with a proper license will
function indefinitely under the current operating environment.

Of course, XXCOPY Freeware comes with no warranty of any kind.


© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #35



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: How XXCOPY-Pro manages the site license.
Date:    2002-05-05
====================================================================

The major design feature that differentiates XXCOPY-Pro from its
Freeware package is its behavior in a network environment.

In order to uniformly apply the site-licensing terms to all users,
XXCOPY-Pro implements its rudimentary counting procedure which
keeps track of the number of computers (the computers on the
network which may be called server, workstation, terminal, or
whaterver) that are accessed by XXCOPY.  The record is kept inside
the XXCOPY entry of the system registry.

This article explains how the XXCOPY-Pro keeps track of the
number of unique computers it encounters using an exmple of
administering a site license for ten computers. 


1.  Installation

    When you acquire a site licence for 10 computers, you will
    receive a special license file (XXCOPY.LIC) which is custom-
    made for you.  The license file is typically delivered to
    you as a small zipped file which is attached to an Email.
    To properly install XXCOPY-Pro, place the unzip XXCOPY.LIC
    file in the same directory as the XXCOPY.EXE file
    (separately downloaded from Pixelab's server).
 
    The first section of the license file is a text which is
    terminated with a Ctrl-Z (End-of-File) marker.  It is
    suitable for direct priting.  You can examine the contents
    of a license file by simply running the following command
    line at the console:

        type xxcopy.lic

    And you will get a print out like the following:

    XXCOPY License
    Serial Number: 67-8901-2345      License Code: 98-7654-3210
    License Granted to:         Pixelab, Inc. of Naperville, IL
    The maximum number of installations at this site:  Ten (10)

    To install, execute the following command line:

        xxcopy  /install

    To display the current license status:

        xxcopy  /license


2.  Record in the System Registry

    XXCOPY then creates an entry in the system registry and
    sets up a table for 10 computer names to be stored
    (likewise, a site license for 50 computers creates a
    table good for 50 entries).  The first slot in the table
    always keeps the name of your computer (the network name
    for "My Computer").

    XXCOPY keeps track of all remote computer names (UNCs)
    it encounters.  The name of the most recently accessed
    computer will always be placed to the second position in
    the table immediately below the host computer.  If your
    XXCOPY usages are always with the same set of computers,
    the entries in the table will remain the same (but the
    order of the entries reflects the recency of the access).


3.  Listing the name of remote host

    You may make a list of the remote hosts that were accessed
    by XXCOPY by the following command line:
    
        xxcopy /hosts


4.  What if you exceeds the limit?

    As long as XXCOPY's network access is within the limit of
    the site license, everything will be fine.  Now, when you
    access a machine whose name is not in the table and the
    table is full?   This happens from time to time.  It is
    not always a violation of the license terms.  We expect
    that computer names are changed from time to time.  When
    an employee leaves a company, his computer is often
    renamed.  Or, equipements always come and go anyway.

    So, when an 11th computer is accessed by XXCOPY, it will
    display the following user prompt:

      \\MyServer, a server (networked computer) volume is being
      accessed.  The server is not in the list of 10 computers
      that you are authorized to access using XXCOPY.  In order
      to avoid this warning message in the future, you should
      upgrade the license so that more server names (at least
      11 computers) can be maintained.

      Do you wish to add the server name in the list now (Y/N)?

    If you answer Y(es), the new computer name will be recorded
    (at the second spot immediately below the host computer's
    entry) in the table.  That will push away the computer name
    in the bottom of the list (the least recently accessed one).
    On your next access to the remote computer by XXCOPY, you
    will not see the user prompt again.

    On the other hand, you may answer N(o) to the prompt.  In
    that case, the name of the new computer will not be saved
    in the list --- no changes in the table takes place.
    But, when you access the same machine the next time, you
    will have to see the same prompt once again.  If you get
    tired of this, it is probably time to upgrade your site-
    license with a larger limit.


© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #36



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: Norton Ghost and XXCOPY
Date:    2002-03-01
====================================================================

This technical bulletin is based on the article that I wrote for
BootLIST.Com (www.bootdisk.com/bootlist/005.htm) in February, 2002.


  ====== To be revised ======


************************************
  What is XXCOPY really all about?
************************************


By Kan Yabumoto    <tech@xxcopy.com>      2002-02-07
                   ©2002 Copyright  Kan Yabumoto


Hello, Everyone.  My name is Kan Yabumoto.  I'm the author
of the XXCOPY software.  It is a great honor to be invited
to this new exciting newsletter for an article.  The subject
is of course, XXCOPY.  Its home page is

    http://www.xxcopy.com

Rather than boring you all to the death by parading the
myriad of features in XXCOPY, I would like to pick a few
topics and give you my side of the story.

I've been using a lot of software products just like you,
and I seldom come into contact with the author of the program.
So, let me make myself available to you and discuss the
product's history, the primary goal, and the near-term and
long-term road map of XXCOPY development.  Also, I would like
to brag about a feature in XXCOPY that I'm most proud of.

After all, XXCOPY is just a file-copy utility.  In order for
XXCOPY to stand out from the crowd in the competition,  it has
to offer to the user something unique.  We wanted to make
XXCOPY irresistible to those who give it a try.

Many of you must have come to know XXCOPY for a particular
purpose.  I hope you found it useful for what you had in mind.
But, chances are, you are still wondering why XXCOPY is so
often talked about in various newsgroups lately.

From my point of view, many favorable comments about XXCOPY
by others are often picking just one of the many virtues of
XXCOPY.  By observing the newsgroups at the sideline, I
often find myself frustrated by the fact people talk about
the relatively "minor" features of the tool.  The real
power of XXCOPY seems to be largely untapped by most users.

So, here I am, trying to de-mystify the tool and set the
record straight.  What is XXCOPY all about?


1. Brief history of XXCOPY

  XXCOPY debuted in the Internet as a freeware in November,
  1999.  But its predecessor, DCOPY (and DCOPY32) was born
  around 1994.  It has been a bundled utility program in
  our DATMAN package (DATMAN makes a tape drive behave like
  a disk.  Visit http://www.datman.com for details).  Its
  modest goal was to circumvent the problem of Microsoft's
  XCOPY which often got stuck in a script (batch file) when
  files are transferred to a NetWare file server for backup.

  The file-sharing problem in a multi-tasking and networking
  environment has always been a common headache. The problem
  will be with us forever.  When a file is exclusively opened
  by one program, the next program which attempts to access
  it has no choice but to let the first program be done with it.
  The trouble with Microsoft's XCOPY was that it gave the
  user the infamous "R(etry) or A(bort)" choice --- you either
  try it again which usually gets you nowhere, or abort the
  whole backup operation.  But worst of all, the situation
  makes the batch script sit there idle (Microsoft later
  added the much-needed third, F(ail) option in the prompt
  along with the /C switch to prevent a failed copy from
  ruining the rest of the backup operation).  DCOPY had that
  capability long before Microsoft corrected its XCOPY.

  We always listen to the users.  Later, we found ourselves
  adding many more backup-related features to DCOPY.  But,
  after many more switches were added, one key principle
  remains the same: the latest XXCOPY's command line syntax
  is still compatible with Microsoft's XCOPY.

  When we released XXCOPY to the general public in late 1999,
  our motivation was to provide something for free in the
  Internet to attract more traffic to our main DATMAN.COM
  web site.  We gave it the new name, XXCOPY which correctly
  characterizes the nature of the product; the behavior stays
  very close to that of XCOPY.  This makes the user's first
  experience with XXCOPY relatively painless, provided that
  he already knows Microsoft's XCOPY fairly well.

2. XXCOPY for cloning the Win9x system disk.

  Soon after the XXCOPY freeware version became more widely
  circulated, a few people discovered its usefulness in
  duplicating the Windows 9x system disk.  I'm not sure
  exactly who mentioned this usage first.  At various
  newsgroups, XXCOPY was recommended to others for disk
  cloning purposes.  At that time, many people were using
  Microsoft's XCOPY for this.  We still see plenty of
  users run the following command for this purpose.

    XCOPY  C:\  D:\  /h /e /k /r /y

  Being compatible with XCOPY, XXCOPY can be run using
  exactly the same combination of switches

    XXCOPY C:\  D:\  /h /e /k /r /y

  But, I was recommending an improved variation,

    XXCOPY C:\  D:\  /ks /h /e /r /q /y /bi /zy

  In order to help memorize this long combination, I
  came up with the following mnemonic for it;
  "Kiss Her Quick, Yes, But I'm busy."  But, it requires
  photographic memory.  So, I devised a shortcut switch
  in XXCOPY that is a direct substitution of the longer
  combination. That is how the /CLONE switch came to life.

  Now, the command is much easier to remember.

    XXCOPY C:\  D:\  /CLONE

  Of course, we could have advocated a batch file to achieve
  the similar goal.  But, this shortest form as a built-in
  switch was an instant success.  Then, I wrote a special
  manual with step-by-step instructions for this operation.

    http://www.xxcopy.com/clone

  If you help others by mentioning the /CLONE switch for
  duplicating the Win9x system disk, I hope you also add
  this pointer in your advice so that the new user will not
  have to wonder "What's next?"  after he runs the /CLONE
  operation and still does not have a bootable disk.
  The MBR, the boot sectors, etc. must be properly
  initialized in order to have a bootable system disk.

  Now, you know why we did not develop XXCOPY for disk clone
  operations.  Nor was the very /CLONE operation specifically
  designed for cloning!  It is simply a natural consequence
  of making a versatile tool for many purposes.  The /CLONE
  switch remains a mere convenience feature in XXCOPY to
  ease the typing and memorizing.

3. Ghost, DriveImage and XXCOPY

  The /CLONE switch made XXCOPY a free alternative to
  Norton Ghost and PowerQuest's DriveImage.  I have great
  respect for both of these products.  In newsgroups, we find
  so many people asking the same question over and over
  again.  Here's a typical thread:

  Q: I just bought a 20GB hard disk and I want to replace my
     Win98 system disk with the new one.  Tell me how?

  A: Most hard disks come with a utility to do just that.
     Otherwise, buy Ghost or DriveImage, or try freeware XXCOPY.

  Some people adamantly suggest Norton Ghost.  Not only do they
  recommend it for the one-time system cloning operation, they
  also advocate the use of Ghost for daily/weekly backup.  That
  is fine.  But, many say they chose XXCOPY and they are happy
  with it.  After all, when you buy a $90 disk, would you spend
  an additional $50 just for this one-time operation?

    ---------------------------------------------------------
     I hear the Ghost software that one bought two years ago
     cannot do well in cloning the XP disk.  Thus, the $50
     price tag is not a one-time investment for a good tool,
     but rather a recurring expense like an annual
     subscription.  I suspect many Ghost advocates are a
     professional system integrator or consultant who buy
     Ghost as his tool for everyday work.  But they must
     not forget that they are talking to one-time users.
    ---------------------------------------------------------

  XXCOPY works great for this purpose.  It works better
  than the XCOPY method by not taking chances with the short
  filename (SFN) (see http://www.xxcopy.com/xxcopy03.htm
  for detail).  XXCOPY preserves the SFN when files are copied
  using the long filename (LFN), whereas most other programs
  (including Microsoft's tools) neglect this aspect.

  XXCOPY's /CLONE command can be used for subsequent daily
  backup without any change (by leaving the old disk in D:
  as a backup drive after the disk swap).  The incremental
  backup will run much faster than Ghost or DriveImage for
  this purpose.  Moreover, in a relatively rare instance of
  either of the disks (original or the newly cloned one)
  having a bad sector, a disk imaging software such as Ghost
  usually cannot handle the bad sector unless the two drives
  have bad sectors in exactly the same positions.

  It is quite amazing that both approaches work.  It's like
  traveling from New York to New Delhi, via Hawaii or via
  Europe.  We fly to totally opposite directions at first.
  In the middle, we are thousands of miles apart.  Yet, we
  arrive at the same goal.

  Am I saying XXCOPY is better than Ghost or DriveImage?  No.
  I say it is just plain silly to compare apples and oranges.
  But, since it continues to be a hot issue, let me briefly
  give my advice to the disk cloning issue once and for all.

  My answer to the Win9x/ME disk clone question:
  -------------------------------------------------------------
   Try XXCOPY Freeware first (be sure to read the XXTB #10).
   If it fails, use Ghost or DriveImage that fits your budget.
 -------------------------------------------------------------

  Honestly, I shouldn't waste my energy on this small issue.
  XXCOPY has never been designed for and will never be made
  for disk imaging.  It happens to work great when one
  wants to make a bootable system disk for Win9x/ME.

  As of this writing, we do not have a similar recipe for
  making a bootable WinNT/2K/XP disk using only XXCOPY.

4. XXCOPY - More Than A One-Trick-Pony.

  When you have done your first /CLONE job with XXCOPY
  and you are happy with it, XXCOPY is not finished yet.
  It has just demonstrated its versatility in one of the
  many things that it is capable of.  Let me emphasize it:

    XXCOPY is not a one-trick-pony, not just for /CLONE.

  When you run XXCOPY /HELP for the first time to obtain the
  help text, the sheer volume will probably overwhelm you.
  The good news is, you need not learn them all at once.
  Take time.  Learn one feature at a time and use it
  repeatedly and explore some more.

  Here is a non-exhaustive list of what those switches do.

   a. select files by filetime, size, attributes, etc.

   b. specify exclusion pattern (files and directories)
      specify inclusion pattern (filename patterns only)

   c. create log file and name-list file.

   d. modify behaviors of all the above and much more...

  In essence, the great majority of file management activities
  you want to carry out are probably supported by XXCOPY already.
  But you need to find out which switch to use and that can be
  difficult.  My favorite reference page for that is:

    http://www.xxcopy.com/xxcopy27.htm

  This page deliberately avoids the alphabetical order; instead,
  the listing is ordered by the functionality of the switches.
  It is even more useful as an overview of all the available
  switches using the functional classification in mastering the
  galaxy of XXCOPY command switches.  I highly recommend it.

  Let me conclude this section with some more examples:

   xxcopy \src\ \dst\ /da#10      // files modified within 10 days
   xxcopy \src\ \dst\ /da:2002-2  // files modified after Feb 2002.
   xxcopy \src\ \dst\ /sz:-100m   // files up to 100 MB long
   xxcopy \src\ \dst\ /ats        // files with system attribute
   xxcopy \src\ \dst\ /x*.tmp     // exclude files that end by .TMP

  Rather than showing all of the 200+ switches, I let your
  educated guess extend this short list to what kind of cases
  the other 200+ switches might do for you.

5. The feature in XXCOPY that I'm most proud of.

  If there is a defining feature in XXCOPY, this is it. 
  The feature called "Wild-Wildcard" is the crown jewel of
  the program.  It opens up new ways to look at the files
  and directories.  Forgive my complacency here, but I want
  you to feel my enthusiasm for it and learn the feature.

  From the user's point of view, the Wild-wildcard feature
  allows you to place as many wildcard characters and at
  any position in the source specifier.  It's quite elegant.

  Programming this feature was a little hard.  Then, handling
  the exclusion items with wildcards made it more difficult.
  Now, to implement all this with a great execution efficiency,
  was the most challenging experience in the entire project.
  But, inventing this type of unique and powerful feature
  brings joy to the programming profession.

  Here's an example of that.

    xxcopy c:\micro*\*\cache*\*\*.jpg  d:\myimages\

  If you know what "*" does to a filespec at the end of a
  fully spelled-out path, you can reasonably guess what it
  does when it appears in the middle of a multi-level pathspec.

  If you are confused and prefer not to know it, that is fine.
  You can use XXCOPY without knowing anything about this feature.
  On the other hand, if you are intrigued by it, let me briefly
  explain.  It's a liberal application of wildcards ( * and ?).

  One way to look at this is to view the feature as an extension
  of the /S switch.  See the difference of the following lines:

    xxcopy c:\mydir\myfile.*      // one directory level
    xxcopy c:\mydir\myfile.* /s   // multi-level subdirectories

  Most XCOPY users are quite familiar with the /S switch that
  allows the file pattern (myfile.*) to appear anywhere inside
  the subdirectories under the c:\mydir\ directory.  The
  file may appear immediately inside the c:\mydir\ directory
  or it may be in second, third or any level of subdirectory.

  Now, we introduce a new notation to denote the effect of /S:

    xxcopy c:\mydir\myfile.*   /s   // multi-level subdirs
    xxcopy c:\mydir\*\myfile.*      // equivalent to the above

  When it has the single-star (..\*\..) sequence, it signifies
  that the item(s) at the right hand side can be at any level of
  subdirectory.  The two command lines behave exactly the same.

  Once we agree upon how the sequence works when it is placed
  immediately left to the filename pattern, we can shift the
  occurrence of the single-star sequence to any other place.
  In short, this notation lets you apply the mechanics of /S on
  the subdirectory level other than the lowest (rightmost) level.

    xxcopy c:\mydir\*\xyz\myfile.*  // the /S switch can't do this

  Another innovation in the wild-wildcard feature is to allow
  wildcards (both * and ?) to appear for any number of times.

    xxcopy c:\*\*dir\*\xyz?\*\myfile.*    // can really go wild.

  So, let us wrap up this section with one more example:

    xxcopy c:\abc\*\xyz\*.jpg

  The xyz subdirectory can be anywhere under c:\abc;

    c:\abc\xyz\john.jpg
    c:\abc\def\xyz\paul.jpg
    c:\abc\def\ghi\xyz\john.jpg

  All the above are selected with c:\abc\*\xyz\*.jpg

6. A One-Liner Batch File for You.

  Who in their right mind need to go wild with the Wild-Wildcard?

  You seldom need to go very wild in filespec.  But, the ultimate
  flexibility in XXCOPY becomes very handy when you look for
  something in your disk.  Since you don't want to remember
  the XXCOPY switches that work best for file searches, a batch
  file really makes your life easier.

  Here is my favorite batch file:

    where.bat
   -----------------------------------------------------
    xxcopy /lzdl/s/h %1 %2 %3 %4 %5 %6 %7 %8 %9
   -----------------------------------------------------

   It is a file-finder script.  It often works best with a
   pathname that starts with the root (but need not to).
   With this batch file, I sometimes go quite wild.
   You may add any "adjective" using the xxcopy switches

    examples:

    where \windows\*\cache*\   // list all in cache dirs
    where \*\temp*\  /sz:0     // zero-byte files in temp dirs
    where \          /da#10m   // made in the past 10 min
    where \mydir\ \ref\   /u   // files common in both dirs
 
   This simple batch script exemplifies the flexibility of
   XXCOPY by allowing many ways to select files.  For instance,
   the fourth example above shows off some nifty combination.

7. XXCOPY Road Map, Near-term and long term.

  Lately, I started to realize a disturbing fact in XXCOPY's
  user community.  I enjoy relating my experience in early
  days of CP/M, MS-DOS and so on with XXCOPY users who reminisce
  their stories with me.  But I suspect that the average age
  of the XXCOPY users is higher than that of the whole computer
  professionals (I'm afraid the same is true to BootDisk.Com)!

  We often hear from people at IT departments' supervising
  positions saying their young system administrators prefer
  clicking the mouse button a few thousand times to taking the
  time and edit a five-line batch file.  Sadly, it may be true.

  If we continue the command line-only design, XXCOPY will
  repeat the demise of the dinosaurs.  We have no illusion.
  So, Graphical User Interface (GUI) is the future of XXCOPY.

  In the near term, a simplistic GUI-based program will satisfy
  novice users' need for XXCOPY.  Since it will omit most
  advanced features, this product can be finished first.

  We also want to introduce a GUI application which helps the
  user find the right switches for file management operations.
  Since it presents nearly all XXCOPY switches in a well-
  organized fashion, it takes longer to develop; hence, it
  will be released at a later date.

  In the past, we have been contacted by a few individuals
  who wanted to develop a GUI-based front end program which
  runs side by side with the XXCOPY program.  We welcome
  initiatives from interested parties who might work with us
  for a loose, non-exclusive partnership.

8. Conclusion for now.

  In conclusion, I try to make XXCOPY a worthwhile program
  for nearly everybody who is eager to learn its rich set of
  file management operations.  My publicly stated goal for
  this program is:  One day, XXCOPY will be called

    The Undisputed King of the File Management Utilities.

  Lastly, I hope this will not be my last time in this
  newsletter.  If you have questions, please send me your
  comments to bootdisk@xxcopy.com.  I will respond to you in
  my next appearance here (whatever name you use in the
  Email (but not your Email address) will appear in it).

  Alternatively, you may post your question to the XXCOPY
  discussion group, or join the group and/or subscribe the
  Email delivery of the messages.

  To post your message, send Email to: xxcopy@yahoogroups.com
  To subscribe the messages: xxcopy-subscribe@yahoogroups.com

  It is a Yahoo-sponsored group (with some ads), and a great
  place to meet other XXCOPY users who are quite eager to
  help newbies with their experience.  I will also post my
  message there when a clarification is needed.  It is also
  the place where announcements about XXCOPY are made.  For
  example, a new XXCOPY beta version is always announced in
  the discussion group, first.  You can post your suggestion
  for a new feature there.  It's like a Usenet newsgroup
  specialized in XXCOPY except responses usually arrive much
  more quickly.  The archived messages (> 1500) are a gold mine
  to retrieve past messages using the keyword search.

  So, please join the "XXCOPY Revolution".

Kan Yabumoto
Naperville, Illinois.



© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #37



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: Format Specifications of Command File in XXCOPY
Date:    2003-10-30 (revised)
====================================================================

Introduction:

  XXCOPY provides a mechanism to allow the user to specify the
  invocation command using text files.  Currently, there are two
  cases of accepting the command input from a text file.
  
    /CF<cfile>   // command file for regular command text     
    /EX<xfile>   // exclusion file; lists exclusion items

   -----------------------------------------------------------
     The only difference between the two types of text file
     is that the command file (by /CF) contains the command
     text that consists of ordinary XXCOPY command arguments
     and switches whereas the exclusion file (by /EX) holds
     a list of exclusion items (file and directory specifiers)
     without the "/X" command-prefix on each exclusion item.
     Other than this difference, the two types of file follow
     the same set of rules in their format.
   -----------------------------------------------------------

  The purpose of XXCOPY's command file is to allow the user
  to compose a command text that may exceed the limit of the
  command line length.

  Since the command line syntax of the original XCOPY (and
  earlier versions of XXCOPY) had to cope with the limit in
  the overall length of the command line, the command switches
  were designed to be short, hence often cryptic.  As a
  consequence, the readability suffered.

  Once we are free from the limit in text length, we can use
  the freedom to our advantage.  Of course, the command file
  still accepts the same command text that you would enter
  directly to the command line.  You may think of the command
  file as an "include" file that supplies a stream of text to
  the command line.

  E.g.,  XXCOPY   /CF:myfile.xcf

         This invocation is equivalent to running the XXCOPY
         program by typing the contents of the myfile.xcf
         file directly at the command line.

  You may add switches before or after the /CF switch. In
  addition, you may use two or more /CF switches in one line.
  All of them are evaluated from left to right.

  E.g.,  XXCOPY   /Q  /CF:myfile.xcf  /WE


Examples Speak Tons:

  For those who are in a hurry and rely on intuition by looking
  at a few examples, let me show a few of them with ample comments.
  If you read all the comments in the examples, most of the
  key features are explained.  But for air-tight definitions
  of the format rules, you must read the lengthy (and boring)
  details that follow.


  Let me start with a short one.

    script1.xcf
    -----------------------------------------------------------
     "C:\My Programs\" c:\backup\  /CLONE     // daily backup
    -----------------------------------------------------------

    This is a one-line script.  The line is just like an
    ordinary XXCOPY command line except the it does not
    contain the "XXCOPY" word itself at the beginning.
    Again, to run this script,
    
        XXCOPY  /CF:c:\bin\script1.xcf

    Note: the comment is allowed even in the real command line
    --- this becomes handy in a batch file.

    
  Here comes a little more realistic example.

    script2.xcf
    -----------------------------------------------------------
     // This script should be run once a day.
      
     "C:\My Programs\"           // the source specifier
     c:\backup\myprog\           // the destination dir
     /CLONE                      // save the latest
     /Z0                         // don't remove extra files
     /oN:c:\bin\script1.log      // create a log file
     /WE                         // wait for a key at the end 
    -----------------------------------------------------------

     My first recommendation is to place only one command item
     per line and to add a comment on each line.


  Finally, let me give you a classy example.  The text in it
  is meant to explain the various features of the command file.

    script3.xcf
    -----------------------------------------------------------
     /*****************************************************
     *                                                    *
     *  script3.xcf    created 2002-05-05                 *
     *                                                    *
     *  This XXCOPY script carries out a daily            *
     *  incremental backup operation from C: to E:        *
     *  The E: drive may be made bootable as C:.          *
     *                                                    *
     *  Invocation:  xxcopy  /cf:c:\backup\script3.xcf    *
     *                                                    *
     *   Log file:    c:\backup\script3.log               *
     *                                                    *
     *   Note: A command filename may have any extension. *
     *         We use .XCF (for Xxcopy Command File).     *
     *                                                    *
     *****************************************************/
     C:\            // source (the whole system disk)
     E:\            // destination  (mirror disk)

     /clone                      // my favorite switch     
     /PZ0                        // prompt killer (for /Z)
     /ON:c:\backup\script3.log   // create a log file
     /Fo:c:\backup\script3.lst   // save file list
     /FM:dtzl                    // list file format control

     //  list of exclusions  ------------------------------
     /X:*.tmp                    // no temp files
     /X:\Windows\*\cache*\       // cache files of any kind
     /X:\*\cookies\              // cookies are junk food
     /X:"c:\My documents\my pictures\2002-May// string split
         \Susie's birthday\*.jpg"            // into 2 lines

          /* 
             A // sequence preceded by a non-blank character
             allows you to logically connect two lines.
             (This is a traditional C-like comment.)
          */ 

      /EX:c:\backup\exclude.lst  // you may use /EX inside
      /CF:c:\backup\another.xcf  // nestable (up to 8 levels)

     :: An in-line comment may start by // or :: which ends
     // at the end of the line.
    -----------------------------------------------------------

    Note to experienced programmers:
 
       The Command File format is modeled after modern
       programming languages like C.  A few exceptions: 

         1. A comment does not behave as a blank.
         2. A comment may be inside a quoted string.
         3. It has a peculiar line-continuation mechanism.


Command File Basic Rules (also applies to Exclusion File):

  The XXCOPY command file is an ordinary plain text file that
  can be created/edited by any text editor (e.g., Notepad).

  Currently, only a 8-bit characters are supported.  I.e.,
  Unicode text is not supported, yet.

  You may add any number of lines in the command file.

  Each line is terminated by a CR (Carriage Return),
  a LF (Linefeed), or a CR-LF sequence.  We call them
  line-break, collectively.
  
  A TAB character can be used interchangeably with a space
  (also called blank).  In this document, we use the word
  blank which may actually be a TAB.  (A TAB character is
  not allowed in a file or directory name.)

  A line-break is usually treated as a blank.
  
  There is a provision to make two (or more) lines behave
  like a continuous line using the Line Continuation Mechanism
  (see below).

  All the usual XXCOPY command line syntax applies to the
  command file text.

   ------------------------------------------------------------
    The XXCOPY command line contains two kinds of arguments:

    1. Command switches (also called options) that always start
       with a slash (/) character (one exception to this
       rule is a macro reference that has the /$xxxx$ sequence
       which may appear as a non-switch argument.

    2. Non-switch arguments that do not start with a slash (/).
       The first non-switch argument is always the source
       specifier and the second (optional) non-switch argument
       is always the destination directory specifier.

    The two types of arguments can be ordered in any way
    except that the source specifier always comes before the
    destination specifier.

    Command switches are evaluated by the order they appear.

    Some related switches are affected by the evaluation order.
   --------------------------------------------------------------


Comments:

  You are encourage to add abundant comments to clarify the
  the meaning and the intent of the command switches.
  Comments are strictly for people and ignored by XXCOPY.

  Two styles of comments are supported:

  1.  In-line comment           // like this one

        An in-line comment starts at either // or :: and
        extends until the end of line.  It can start anywhere
        in the line including at the beginning of the line.

  2.  Bracketed comment         /* like this */

        A bracketed comment begins at /* and ends at */ which
        may straddle over two or more lines.


  Precedence of comments:

    The two styles are of equal precedence.  That is, when
    an in-line comment is specified, a /* sequence specified
    to the right hand side of the in-line comment header
    (// or ::) within the same line is completely ignored.

    Similarly, once a bracketed comment field is started by
    a /* sequence, either // or :: within the bracketed
    comment field has no effect until the terminator, */ is
    encountered.

  Not a substitute for a blank:

    Unlike most programming languages which treat a comment
    field as a blank, XXCOPY does not treat either an
    in-line comment or a bracketed comment as a blank.
    That is, a bracketed comment field that begins at /* and
    ends at */ may even be placed within a path specifier
    (this bad habit is strongly discouraged, nevertheless,
    it is syntactically acceptable). 

  Comments within a quoted string:

    The comments and line-continuation mechanisms are totally
    independent of whether or not they appear within a quoted
    string (surrounded by a pair of double-quotes, ").

  No carry-over of a comment:

    An open bracketed comment which is started by /* but not
    terminated by */ within the command file will be implicitly
    terminated so that a runaway comment (a syntax error) will
    not be carried over to outside of the file.


Line Continuation Mechanism:

  Since Windows' long filename (LFN) may have as many as
  256 characters, the whole string may not be visible in
  a window of a text editor if it is entered as one long
  string.  XXCOPY's command file format allows you to break
  up a long string into multiple lines to facilitate the
  handling and help improve the readability while treating
  it logically as a single string.

  There are two ways to logically connects adjacent lines.
  Both of them take advantage of the way XXCOPY treats the
  comment field (the In-line comment and the Bracketed comment
  as discussed above).  Let me explain the use of Bracketed
  comment first which is probably easier to use.

    Bracketed comment to connect adjacent lines:

      Since a bracketed comment will be removed by XXCOPY
      as the first step in processing a command text, it provies
      a simple way to connect two lines.  All the characters
      between the /* sequence and the */ sequence (including
      the beginning and ending two characters) will be completely
      reremoved from the text.  
      
      Example: 

          "C:\Documents and Settings\Default User\/*  comment
             */Application Data\"

        In this example, the above two lines are the same as
         
          "C:\Documents and Settings\Default User\Application Data\"

      
      Unlike in common programming languages such as C, the
      bracketted comment will not be substituted by a space
      character.  Therefore, the absence of any space character
      before and after the comment field will result in the
      combined string without space. as shown above.  You may
      also break the line after a space.  The following example
      is another example to split the same path name above.

          "C:\Documents and Settings\Default /* glue comment
              */User\Application Data\"      // regular comment

      Note that the exact number of the space character is
      preserved by this technique.

      Needless to say, you may connect an arbitrary number of
      lines into one logical string.

      Example: 

            "C:\Program Files\Microsoft Visual /*
          */Studio .NET\Vc7\VCWizards\Classwiz/*
          */\MFC\Simple\Templates\1033/*
          */\doc.cpp"


    In-line comment to connect adjacent lines:
 
      A line whose in-line comment field (that starts with //
      or ::) is immediately preceded by any character other than 
      a blank will be logically connected to the first non-blank
      character in the next line.


      Example: 
  
	  /ON:c:\my_directory\and_this_path_name_is//  comment
	     \connected_like_this\logfile.txt

	  In this example, the in-line comment that begins at //
	  is placed without any blank.  Any leading blank
	  (space or tab) character in the next line will be
	  discarded.  In the above example, the second line that
	  starts at the backslash connects to the previous line
	  immediately before the comment-marker (//).
 
      Example: 

	  "C:\Program Files\Micro::
	  soft Internet\Inter//       add comment if you want
	  net Mail\cookies.txt"

	  Here, a filename is broken up into three lines and
	  was not split at a clean boundary of a directory name.
	  Note that the line-continuation may connect lines 
	  even within a quoted string.

      Note:
  
	  You may add blanks at the beginning of the continuing
	  line that follow the line continuation sequence to
	  improve readability (the leading blanks are ignored).

	  It is recommended that a filename string be split at
	  a non-blank character.  If you are forced to split a
	  filename before or after a space character, you may
	  do so by use of the bracketed comment (/* .. */).
	  The following two pairs of lines are equivalent.

	  E.g.,  "C:\Program Files\Microsoft Internet\Internet//
		 /* before a space */ Mail\cookies.txt"

		"C:\Program Files\Microsoft /* after a space */::
		 Internet\Internet Mail\cookies.txt"

          But, then, it is probably simpler to use the bracketed
          comment to beging with.

	  E.g.,  "C:\Program Files\Microsoft /*
	         */ Internet\Internet Mail\cookies.txt"

  The choice between the bracketed comment scheme and the in-line
  comment scheme as the mechanims for line-connection is totally
  up to the user.  Some people just do not like the way the
  continuing line looks which typically starts with a funny
  sequence (*/).  The in-line comment method allows you to start
  the continueing line with your characters.
 
  Either of the methods does not force you to start the
  continuing text at the first colume even though it will
  be perfectly legal.


Colon after a command switch:

  With the command file feature, the old syntax of making
  the command as short as possible is no longer a virtue.
  Now, readability has precedence over compactness.

  Any XXCOPY command switch that accepts a parameter may use
  a colon to separate the command letter(s) from its parameter
  except in cases where a non-alphanumeric character is a
  syntactic element of the switch.

     /ONmyfile.log    /IN*.tmp    /FMdtl     /Q2
     /ON:myfile.log   /IN:*.tmp   /FM:dtl    /Q:2

  Here are the exceptional cases where a colon cannot be added:
  
     /DA#4   /SZ!5-10   /TD+5

  Note: the colon as a separator between the switch letter(s)
        and its parameter is strictly optional and is not a
        required element in the XXCOPY command.

        Of course, there are a few cases where a colon is a
        required character that distinguishes between like
        variations (e.g., /DA:2002 and /DA#2000).


Nesting:

  Since the text in a command file can contain any valid XXCOPY
  command arguments and switches, it is natural to allow a /CF
  switch within a command file.  It is called Nesting.
  
  To avoid a possible recursive inclusion (which would result in
  an infinite loop), XXCOPY sets the maximum nesting levels to 8.

  Nesting a command file (/CF) or using a exclusion file (/EX)
  usually add a complexity to the command organization.  But if
  used judiciously, the technique may factor common sets of
  command switches and exclusion items.  
  
  On the other hand, a single /CF file organization (without
  embedded /CF or /EX) is most straightforward.  It also allows
  viewing the entire XXCOPY in one self-sufficient file.
 

© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #38



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: Unattended XXCOPY execution
Date:    2004-10-04
====================================================================

Introduction:

    We frequently receive questions regarding how to run XXCOPY in
    a fully automated (unattended) fashion.  Some questions ask
    for a mechanism in the XXCOPY program to enter the log-in user
    name and password --- either for accessing a password-protected
    section of the hard disk, or a remote computer that requires
    log-in.  

    Although these questions are phrased differently, our answer
    is the same:

       XXCOPY does not support any of such features directly.

    Then, an inevitable question follows: how can we set up a script
    to automate a task with XXCOPY?  Our answer is to use the batch
    file as the simple mechanism to automate any task that involves
    XXCOPY.  As a matter of fact, XXCOPY is designed to work well
    as a component in a batch file.

      ----------------------------------------------------------- 
       We strongly believe in the division of labor among
       applications.  If XXCOPY supported a mechanism to
       specify the log-in username and password, then, the
       command line that specifies the password would be visible
       to unauthorized users --- encrypting such information
       would make it cumbersome to say the least.  Furthermore,
       imagine if each and every application (e.g., Microsoft
       Word) starts providing a log-in feature of their own, and
       you would have to become familiar with many different
       rules to accomplish the same thing.  This is why XXCOPY
       does not provide log-in mechanism of its own.  After all,
       the Windows environment supports the log-in mechanism in
       a centralized way.  You just have to learn how.
      ----------------------------------------------------------- 
   
    Here, in this article, we are going to show you how to
    set up a task to automate the execution of a batch file
    (or, more generally, any program).  Also, we will show you
    how to set up a batch file to handle the log-in procedure
    automatically.


Scheduled Tasks:

    All versions of Windows since Windows 98 come with the Task
    Scheduler pre-installed (if you have the antiquated Windows 95
    or NT4, you may install the Task Scheduler via Internet
    Explorer 4 or above).  If you have Windows 98 or ME, you should
    find the "Scheduled Tasks" icon inside "My Computer".  If you
    use Windows 2000, XP, or Server 2003, it's in the Control Panel.

    The Scheduled Tasks feature seems quite intuitive, so Microsoft
    does not talk much on this subject:

        Windows 2000: Using Scheduled Tasks

        Windows XP: Using Scheduled Tasks

    In essence, you can just drag-and-drop either a program file or
    a batch file (or their shortcut icon) into the Scheduled Tasks
    window and set the properties for the job.


Why does my job in the Scheduled Tasks fail to run?

    This is the common question that begs an answer.  Starting with
    Windows XP, we stared to hear this question quite regularly and
    we wondered why for some time (it prompted me to write this
    article).  So, it's worth checking the setup parameters once more.
    Just double click the job (icon) inside the Scheduled Tasks
    window.  Although the Scheduled Tasks can invoke any program,
    we will limit our discussion here on a task that runs in command
    line mode (i.e., DOS Box).  Here's the basic ingredients:

    Task tab:
        
      Run:    [ the command line text ]

         This field holds the full command line text that you
         would normally type in a DOS Box.

         E.g.,  c:\windows\system32\xxcopy.exe  c:\  d:\ /clone /yy
                c:\mydir\mybatch1.bat
   
      Start in:  [ c:\                 ]

         This field specifies the "current directory" setting for
         the DOS Box to appear.  If the command relies on where
         the current working directory is set, this field must be
         specified accordingly.  We suggest that you write your
         XXCOPY script in such a way that the script may run from
         any directory setting.

      Comments:  [                     ]

         This field is strictly optional.

      Run as:    [MyMachine\john       ]    [Set password]

         This filed should hold the log-in user name (preceded by
         the name of the computer).  If the particular user has a
         non-blank password, then, the correct password must be
         entered by clicking the [Set password] button at the right. 

           ---------------------------------------------------
            Obviously, this is exteremely important that the
            password is set correctly, else, the task will
            not run as expected.
           ----------------------------------------------------

      [v] Run only if logged on

         If the log-in user's password setting is blank, this
         box must be checked.  Otherwise, the scheduled
         task will quietly fail without warning!

           ---------------------------------------------------
            We believe this is the most common problem for
            those who have used the Scheduled Tasks feature
            successfully on Windows 9x/ME or 2000 in the past.
           ---------------------------------------------------

      [v] Enabled (scheduled task runs at specified time)

         This setting lets you disable the job without deleting it
         altogether by unchecking this box.  Obviously, if you want
         to automate the job, this box must be checked.

    Schedule tab:

      Schedule Task:         Start time:
       [ Daily        ]       [ 12:30      ]      [Advanced]

      Schedule Task Daily
      
        Every  [ 1    ] day(s)

    Settings tab:
  
       ....  (more rules can be entered as needed)


How can I run batch file that needs log-in?

    This is also a common question.  In Windows XP, when you
    right-click on an icon for a regular program (.EXE) or its
    shortcut, you will see a floating menu that includes the
    "Run As ..." entry where you can set the log-in user name
    and its password.  
    
    But, if the icon represents a batch file (.BAT or even .CMD),
    the floating menu does not show the "Run As..."  selection.
    What you need then, is the command processor (CMD.EXE) which
    invokes the batch file.  
    
    Say, you have a batch file, C:\mydir\mybatch1.bat and you
    want to specify the log-in paramters for it.  Do the followng:

    1.  At an empty area of a window, right-click and select
    
          New > Shortcut.

    2.  In the "Create Shortcut" wizard, enter the following line:
    
          Type the location of the item:
           [ c:\windows\system32\cmd.exe /c c:\mydir\mybatch1.bat  ]

    3.  Type a name for this shortcut:
           [ My Batch 1    ]           (give any name you want)

    4.  Click the Finish button and a shortcut for CMD.EXE will be
        created.
 
    5.  Right-click the new shortcut ion and you will find the
        entry in the floating menu to specify the log-in paramters.

           "Run As..."

    6.  Set the user name and the password for the batch file.



  To summarize this technique, a batch file invocation has
  to be converted to an execution of the CMD.EXE file with
  the "/C" switch followed by the batch file path in order
  to attach a log-in paramter that is different from the
  "current" log-in user.



© Copyright 2002 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #80



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: A minimum WinXP Install (work in progress)
Date:    2003-03-23
====================================================================

In many occasions, it is very convenient to have a Windows XP
system with a minimum set of functionality.  

It is sometimes convenient to have a second set of Win XP
system installed on the same drive as what Microsoft calls 
"Parallel Install".  Although Microsoft discourages to use
the same volume for parallel install, there are also advantages
of doing so.  For one thing, the volume already has common
directories such as "\Program Files\" in place which are
readily available.  This is one of the situation that
knowing the minimum XP file set helps reducing the unnecessary
storage space.


  ------------------------------------------------------------
   When you use the same volume for second "Parallel Install",
   you need to take certain precaution in order to avoid
   possible collision of files that inadvertently "breaks"
   the working (main) Windows XP system.  So, don't try it
   at home --- not just yet.   Another technical bulletin
   with a full coverage on the subject is in order.
  ------------------------------------------------------------



The following is a list of files for the minimum XP.

C:\windows\
C:\windows\fonts\*.ttf   *.fon
C:\windows\resources\themes\luna\luna.msstyles
C:\windows\winsxs\manifests\*.manifest
C:\windows\winsxs\winsxs\*\comctl32.dll
C:\windows\system32\config\*.*
C:\windows\system32\drivers\*.sys
C:\windows\system32\*.dll     (less than half is all you need)


Here's what you don't need (You can safely delete)

  C:\windows\apppatch\
  C:\windows\inf\
  C:\windows\system\        (surprise!!!)
  C:\windows\msagent\
  C:\windows\help\
  C:\windows\ime\           (depending on the language)
  C:\windows\srchasst\
  C:\windows\mui\
  C:\windows\temp\
  C:\windows\debug\
  C:\windows\tasks\
  C:\windows\registration\
  C:\windows\pchealth\
  C:\windows\installer\
  C:\Windows\system32\catroot\
  C:\Windows\system32\catroot2\
  C:\Windows\system32\wbem\
  C:\Windows\system32\dllclache\
  C:\Windows\system32\setup\
  C:\Windows\system32\npp\
  C:\Windows\system32\spool\
  C:\Windows\system32\inetsrv\
  C:\Windows\system32\ime\
  C:\Windows\system32\com\
  C:\Windows\system32\1033\
  C:\Windows\system32\usmt\
  C:\Windows\system32\mui\
  C:\Windows\system32\oobe\
  C:\Windows\system32\xircom\
  C:\Windows\system32\restore\
  C:\Windows\system32\macromed\


Note that many of these directories will be created when
you boot up the system for the first time into the minimum XP
environment.  Typically the newly created directories remain
empty (you may delete them, but they will come back).


I haven't tried to find the minimum set for the font files
as well as most of the files listed as needed in here.  But,
the relatively small directories are not very relevant.
I'm concentrating on the total space occupied by unnecessary
files --- the goal for now is to reduce the storage requirement
more than the total number of files (but in a FAT volume),
many small files also contribute to a substantial waste.


So far, I have reduced the \Windows\ directory size from 650MB
down to 296 MB.  Still the largest section is by far the
C:\windows\system32\ directory which is a dumping ground for
any applications.  I have a hunch that once the essential
DLL files are identified, the total byte count will be less
than 200 MB.


Since this directory grows over time
(every time you add a new application, you may find lots of
files added into this directory), it is nice to know what
is the minimum requirement in this very important directory.

Here's a few tips to remove unnecessary files:


  *.nls     National Language support files.
            except for what aplly to your own language environment.

            In my (U.S. English) settings, I need only the
            following three:
                
            c_437.nls 
            c_1252.nls
            l_intl.nls
 
  kbd*.dll  Keyboard control library files.
            except for what applies to your own keyboard.

            In my (U.S. English) settings, I kept the following:

            kbdus.dll

	    The easiest way to find what is needed is to run the
	    following command:
	    
	    del c:\windows.alt\system32\kbd*.dll

	   (the one in use won't be deleted.)


  odbc*.dll   ODBC (Open Database Connectivity) related files

  
  avi*.dll    Vide Capture tools
 
 
Mmore study is needed to remove unnecessary files... 



If you know for sure a list of DLL files that are not needed,
please let me know.  Also, if you know certain files that
are needed in your system (especially for non-US environment,
please contact me.

Kan Yabumoto 
 

© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #81



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: A minimum Win98SE Install
Date:    2003-04-08
====================================================================

Introduction:

  In many occasions, it is convenient to have a Windows Win9X/ME
  system with a minimum set of functionality.  A typical Win98SE
  directory may grow to over 600 MB after years of use.  But, it
  can be trimmed to less than 40 MB for a mininum yet functional
  environment.  For example, when you migrate your Win9X system
  to XP, it may be useful at times to keep the minimum Win9X
  install as a dual-boot system which uses a modest disk space.
 
  There are some differences among various releases of the
  so-called "Win9X" (collectively referring to Windows 95, 95-OSR2,
  98, 98SE, ME).  Although Windows ME was the most recent release
  in the Win95 family, due to its restrictive nature (i.e., does
  not allow a smooth transition from the initial DOS stage to
  the Windows (GUI) environment. Therefore, we favor Win98SE as
  a relatively stable and easy-to-manage environment.  Since the
  variations within the Win9X family are relatively small, most of
  what you find in this article should apply to all Win9X versions.

    ----------------------------------------------------------------
     Before going into the details, let me clarify that what I
     refer to the "minimum" Windows environment is what I feel
     essential for common Windows system management, mostly file
     management operations.  That includes the ability to access
     the local area network, but not necessarily to the Internet.
     It supports fully functional "Windows" (GUI) operations with
     Explorer with mouse control.

     In short, the minimum configuration is my arbitrary choice.

      Supports                                  Removed
     ---------------------------------------   -------------------
      LAN access  External USB-Disk             Internet Explorer
      RegEdit     Scheduled Tasks               Outlook Express
      ScanDisk    Windows Explorer              Paint Brush
      DOS Box     Control Panel                 CD (music) Player 
      DeFragger   2xExplorer     (shareware)    Solitaire
      WinIpcfg    TotalCommander (shareware)    Sound Recorder
    ----------------------------------------------------------------


What to expect:

  The compactness of the Windows directory in the minimum Win9X
  system speaks a volume for its virtue.  The following chart
  was compiled from a system that I have been using and the
  directory size.  Most of us don't even remember what was the
  original size of the Windows directory when it was installed.
  So, I went back and reinstalled the Win98SE system as a clean
  install (a minimum configuration with network support).

  In the following chart, three size values are listed which
  are labeled, Initial (after a clean install), Before (the
  result of years of usage), and After (the end result of
  trimming non essential files), respectively.

   Directories                      Initial   Before    After
  ------------------------------------------------------------
   C:\windows\     (1st level only)   10 MB    22 MB     8 MB
   C:\windows\system\                 98 MB   180 MB    23 MB
   C:\windows\inf\                    12 MB    22 MB   < 1 MB
   C:\windows\java\                   11 MB    23 MB    -----
   C:\windows\sysbckup\                8 MB    18 MB    -----
   C:\windows\help\                    7 MB     9 MB    -----
   C:\windows\fonts\                   5 MB    11 MB     3 MB
   C:\windows\system32\                4 MB     4 MB     1 MB
   C:\windows\command\                 3 MB     5 MB     2 MB
   C:\windows\Start Menu\            < 1 MB   < 1 MB   < 1 MB
   C:\windows\All Users\             < 1 MB   < 1 MB   < 1 MB
   C:\windows\desktop\               < 1 MB   < 1 MB   < 1 MB
   C:\windows\(others)\               13 MB   206 MB    -----
  ------------------------------------------------------------
   Total space (size)                172 MB   500 MB    37 MB
   Total number of files              2,433    4,000      496


  When we look at the history of the Windows OS evolution from
  DOS, other than the rudimentary network support plus the GUI
  support, everything else really lies outside of the traditional
  sense of operating system.  The extra features are those which
  were once classified as applications (such as sound, image
  processing, and even video handling).  We should not lose the
  sight by Microsoft's marketing policy of bundling everything
  on earth as the so-called Windows.  Once these non essential
  parts are stripped away, Win 95 through ME should still be
  very similar.


How do we trim the excess?

  Unlike the good old DOS where just one set of files supported
  practically all IBM-compatible PCs, the Windows operating system
  is dependent on the specific combination of hardware components.
  With Windows, hardware-specific device drivers are often needed.
  This makes it unpractical to define a small set of files that can
  support most of the PCs.  The agonizingly long installation time
  for the Windows OS is spent mostly on hardware related operations.
  Therefore, the standard Windows OS contains a substantial amount
  of files that are not always needed in a particular environment.

  In order to achieve the ultimate minimum Win9X system for a
  computer,  we need to identify and eliminate what's not needed.
  And, that takes time.  The more you work, the more fat you can
  trim --- it all depends upon how much time  you want to invest.

  From a practical point of view, what most of us want is not
  necessaryly the absolute minimum configuration, but rather,
  a reasonable configuration which is nearly optimum.  After all,
  there are quite a few small files that just can't justify our
  attention.  For this article, I've written a set of XXCOPY
  command file scripts (.XCF files) which help you slash the Win9X
  directory size dramatically with a least amount of effort.
  Additional trimming of the directory size must be carried out
  by you.  To this end, I offer a few suggestions to follow.


The strategy in achieving your minimum Win9X environment.

  Since this process is a trial-and-error method, it is best
  that we keep the orininal full featured Widows directory
  intact and work on its duplicate.  It is inevitable that
  when files are removed from a working Windows environment,
  the system may become unstable, or even un-bootable.  The
  technique described here keeps this in mind and prepares a
  simple recovery method in the iterative process.  However,
  if you are a complete novice in the command line operation,
  this technique may not be for you.  If you are scared by
  this statement, you may observe what others have to say
  with this article in the XXCOPY discussion group.

  We will create a special boot diskette from which you can
  boot into either the original (MAX) Windows or the trimmed
  down (MIN) Windows from a simple menu option.  This approach
  enables us to work without disturbing the existing system
  boot setups on the hard disk.

  Let us call the special diskette, M9BSF disk which stands for
  "Minimum Win9X Boot Switch Floppy" (if only for no better name).
  The M9BFS disk used here is a variation of the Quick Boot Disk
  that was described in XXTB #32).

  When you create the M9BSF disk and restart your computer,
  you will see the following four choices in the startup menu:
  
     CURRENT    // reboot without switching
     ORIGINAL   // make the original (MAX) windows current and boot
     WIN_MINI   // make the minimum (MIN) windows current and boot
     DOS_PROMPT // stay in the DOS command prompt

   The switching between the original and the minimum Win9X
   environments is carried out by renaming the windows directories.

                              Original Mode   <--->  Minimum Mode
    -----------------------------------------------------------------
     Original Win directory   C:\WINDOWS\     <--->  C:\WINDOWS.MAX\
     Minimum Win directory    C:\WINDOWS.MIN\ <--->  C:\WINDOWS\
    -----------------------------------------------------------------
    
    Note: Since WinME does not allow you to enter the Windows (GUI)
    environment directly from the initial DOS (7.1) stage, every
    time the windows directories are switched, an extra reboot is
    needed.  Windows 95, 98 and 98SE are much easier to work.


Procedure overview (See the next section for detail).

  1.  Download the minwin9x.zip file for set of script files.
      All necessary script files are pre-configured.

  2.  Prepare the M9BSF disk by formatting a system diskette
      and add a few files by running MKM9BSF.BAT.

  3.  Create the minimum Win9X directory by running MKMIN9X.BAT
      which selectively copies files from the Win9X directory.

  4.  Reboot the system using the M9BSF disk and switch to
      the new mimimum Win9x environment for the initial test.

  5.  Further remove non essential files from the minimum Win9X
      directory.  If needed, restore the orignal Win9X directory.


Step-by-step Instruction.

  1.  Boot up your computer into the Win9X (GUI) environment.

  2.  Download the following file,

        http://www.xxcopy.com/download/minwin9x.zip

        Unzip the downloded file, minwin9x.zip into the temporary directory
        (e.g., C:\MinWin9x that was created earlier as the working directory).
        You will find the following files:

         README.TXT    // a documemt file 
         WINSTATS.BAT  // show stats of the Windows directory
         MKM9BSF.BAT   // batch file to make the M9BSF disk
         MKMIN9X.BAT   // batch file to make the Minimum Windows directory
         MKMIN9X0.XCF  // xxcopy command file (Step 0)
         MKMIN9X1.XCF  // xxcopy command file (Step 1)
         MKMIN9X2.XCF  // xxcopy command file (Step 2)
         MKMIN9X3.XCF  // xxcopy command file (Step 3)
         MKMIN9X4.XCF  // xxcopy command file (Step 4)
         MKMIN9X5.XCF  // xxcopy command file (Step 5)
         MKMIN9X6.XCF  // xxcopy command file (Step 6)
         MKMIN9X7.XCF  // xxcopy command file (Step 7)
         MKMIN9X8.XCF  // xxcopy command file (Step 8)
         MKMIN9X9.XCF  // xxcopy command file (Step 9)
         MKMIN9XA.XCF  // xxcopy command file (Step A)
         MKMIN9XB.XCF  // xxcopy command file (Step B)

         M9XFILES.TXT  // list of refrence file set (by size)
         M9XFILEA.TXT  // list of refrence file set (by name)
         M9REFDIR.ZIP  // reference (skeleton) directory


  3.  Open a DOS Box ( Start > Run... [ command.com ] )
      In the remaining steps, I will provide the command line
      that you type at the DOS prompt.

  4.  Make the temporary directory that you created earlier current.

        run command:   CD  C:\MinWin9x

  5.  Format a blank diskette.

        run command:   FORMAT  A: /S

  6.  Run the MKM9BSF.BAT program in the current directory.
  
        run command:   MKM9BSF.BAT
        
        The batch file will create the following files:
  
           A:\MSDOS.SYS
           A:\CONFIG.SYS
           A:\AUTOEXEC.BAT

        These files are created on-the-fly based upon the name of
        the current Windows 9X directory (set by WINDIR setting).
        The diskette will be ready for the next reboot.

  7.  Run the MKMIN9X.BAT program in the current directory.
  
        run command:   MKMIN9X.BAT

      The batch file program will invoke a series of XXCOPY
      commands using the command files saved in this directory. 
      When the batch file is successfully executed, the new
      minimum Win9x directory will be created. 

  9.  Reboot the system using the M9BSF disk.
      Make sure that the BIOS is configured to start from
      the diskette (A:) if not set accordingly.
      
 10.  You will find the following boot menu:
 
        CURRENT    // reboot without switching
        ORIGINAL   // make the original (MAX) windows current and boot
        WIN_MINI   // make the minimum (MIN) windows current and boot
        DOS_PROMPT // stay in the DOS command prompt

 11.  Select the WIN_MINI option and enter the new minimum Win9X
      environment.  Should you find the new environment unstable,
      you may reboot the system using the M9BSF disk and select
      the ORIGINAL option to go back to the full Win9X environment.

 12.  Ultimately, it will be most convenient if you make changes
      in the XXCOPY command files (MKMIN9X?.XCF) and recreate
      the minimum Windows directory from scratch.  The XCF file
      set will serve as self-documenting scripts which can be
      used again, or become a basis for further refinements. 
 
      To obtain the statistics on the current Windows directory,
      run the WINSTATS.BAT script.

      Another useful document can be generated by the following
      XXCOPY command:
      
        xxcopy %windir%\ /LZL/S/H/NP/Q2


Refinement strategies:

  If you find, warning messages complaining a missing driver file,
  write the file name down and make necessary adjustments inside
  the Windows if you can.

  Alternatively, you may reboot and select the DOS_PROMPT option.
  At the clean DOS environment before entering Windows GUI, you may
  copy missing files from the original windows directory
  (C:\WINDOWS.MAX\).

  If you start this procedure from a Win9X system which has been
  in use for months, it is likely that the initial size of your
  minimum Windows directory may be 100 MB or more.  The first
  thing you need to do is to establish a stable Windows environment
  without encountering any warning/error message at the time of
  booting.  There are many approaches that you can take after the
  initial attempt to an optimally lean Windows directory.

  1. One of my suggestions to achieve the smallest Windows directory
     is to install a fresh Win9X directory using Microsoft's
     Install CD (choosing the minimum option).  The initial
     Windows directory size will be about 175 MB for Win98SE.
     By running the MKMIN9X.BAT program on the freshly installed
     Win9X directory, you should be able to further trim it down
     to less than 40 MB.  A fresh install of Win9X may take
     45-60 minutes.  But, it may well be quicker than any other
     method.

  2. Or, you may save some time if you study the reference files
     that are included in this package (also shown in XXTB #82.

       M9XFILES.TXT  // list of refrence file set (by size)
       M9XILESA.TXT  // list of refrence file set (by name)

     You should create a list of files in your Windows directory
     and go after large files.  The M9XFILES.TXT file will give
     you a convenient reference since it is sorted by the file
     size.  By going after the handful of largest files in
     the list, your early efforts should be rewarding.  But, as
     you go down the list of files, the return on investment in
     time will gradually decrease.

  3. Yet another method for consideration is to create a
     reference windows (skeleton) directory by unzipping the
     M9REFDIR.ZIP on your hard disk.  To conserve space, all
     the files in the reference directory are zero-byte files.

     You may use XXCOPY's advance feature to manipulate your
     Windows directory with the skeleton directory as a reference.
     
     For example the following 3-step procedure removes files
     that are 100 KB or more that are not found in the reference
     directory (the second step marks the selected files by
     Archive bit (A-bit) which will be used in the 3rd step).

       xxcopy  c:\windows\  /az/s         // clear the A-bit 
       xxcopy  c:\windows\  c:\m9refdir\  /aa/s/h/bb/sz:100k-
       xxcopy  c:\windows\  /rs/a/s/h/r   // remove files with A-bit

     Or, you may tag the files not in the reference directory
     by A-bit and use other tools such as TotalCommander to
     move files in-and-out of the directory for experiments.
     
       xxcopy  c:\windows\  /az/s         // clear the A-bit 
       xxcopy  c:\windows\  c:\m9refdir\  /aa/s/h/bb


Feedback:

  Due to the time constraints, the list of the files in my
  minimum Windows 98SE system is not the absolute minimum.
  If you find any of the files included in my list that is
  not essential to most computers, please let us know by
  posting message at the XXCOPY discussion group:

      http://groups.yahoo.com/group/xxcopy/

  Please do not send me Email asking technical questions
  regarding this procedure.  I encourage you to post your
  question in the discussion group.

  

© Copyright 2003 Pixelab, Inc. All rights reserved.

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


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

XXCOPY TECHNICAL BULLETIN #82



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: The list of files for a minimum Win98SE install
Date:    2003-04-08
====================================================================

  This is a supplement to XXTB #81
  with lists of files in the minimum Windows 98SE directory.

  The first part provides the list of files in the descending
  order of file size that is followed by the same list in the
  alphabetical order.  They are also provided in M9XFILES.TXT
  and M9XFILEA.TXT, respectively which are included in the
  minwin9x.zip file available for download.

       ----------------------------------------------------
        Some statistics about the system
  
        Total Windows directory size = 38 MB
  
        A handful of files that are considered to be
        non-essential are not listed.
  
         OS:  Windows 98 Second Edition (English)
         PC:  Home-built PC:
         MB:  Tyan Trinity (S1590) with AMD K6-II 350 MHz
       -----------------------------------------------------



  List of files in the minimum Win9X directory (by file size)

    2,158,624  C:\WINDOWS\SYSTEM.DAT
    1,400,832  C:\WINDOWS\SYSTEM\SHELL32.DLL
      946,448  C:\WINDOWS\SYSTEM\SHDOCVW.DLL
      928,319  C:\WINDOWS\SYSTEM\VMM32.VXD
      803,088  C:\WINDOWS\SYSTEM\BROWSEUI.DLL
      790,528  C:\WINDOWS\SYSTEM\OLE32.DLL
      745,168  C:\WINDOWS\SYSTEM\SETUPX.DLL
      598,288  C:\WINDOWS\SYSTEM\OLEAUT32.DLL
      577,808  C:\WINDOWS\SYSTEM\COMCTL32.DLL
      549,664  C:\WINDOWS\SYSTEM\USER.EXE
      504,080  C:\WINDOWS\SYSTEM\SHDOC401.DLL
      491,792  C:\WINDOWS\SYSTEM\MLANG.DLL
      471,040  C:\WINDOWS\SYSTEM\KERNEL32.DLL
      459,024  C:\WINDOWS\SYSTEM\WININET.DLL
      446,736  C:\WINDOWS\SYSTEM\URLMON.DLL
      438,272  C:\WINDOWS\WINREP.EXE
      409,600  C:\WINDOWS\SYSTEM\SETUPAPI.DLL
      387,072  C:\WINDOWS\SYSTEM\SYSDM.CPL
      385,024  C:\WINDOWS\SYSTEM\CRYPT32.DLL
      373,643  C:\WINDOWS\SYSTEM\COOL.DLL
      356,352  C:\WINDOWS\SYSTEM\SHDOCLC.DLL
      356,134  C:\WINDOWS\NET.EXE
      345,584  C:\WINDOWS\SYSTEM\GDI.EXE
      339,968  C:\WINDOWS\SYSTEM\RPCRT4.DLL
      322,824  C:\WINDOWS\FONTS\TIMES.TTF
      297,660  C:\WINDOWS\FONTS\COUR.TTF
      282,896  C:\WINDOWS\SYSTEM\SHLWAPI.DLL
      276,672  C:\WINDOWS\SYSTEM\INETCPL.CPL
      274,704  C:\WINDOWS\SYSTEM\WEBCHECK.DLL
      274,432  C:\WINDOWS\SYSTEM\MSVCRT20.DLL
      273,020  C:\WINDOWS\FONTS\ARIAL.TTF
      266,293  C:\WINDOWS\SYSTEM\MSVCRT.DLL
      249,012  C:\WINDOWS\FONTS\TAHOMA.TTF
      245,760  C:\WINDOWS\SYSTEM\MSTASK.DLL
      221,280  C:\WINDOWS\SYSTEM\DESK.CPL
      217,088  C:\WINDOWS\SYSTEM\RASAPI32.DLL
      215,056  C:\WINDOWS\SYSTEM\DSKMAINT.DLL
      202,800  C:\WINDOWS\SYSTEM\DIBENG.DLL
      185,902  C:\WINDOWS\SYSTEM\VMM32\IFSMGR.VXD
      180,224  C:\WINDOWS\EXPLORER.EXE
      176,128  C:\WINDOWS\SYSTEM\COMDLG32.DLL
      174,996  C:\WINDOWS\SYSTEM\LOCALE.NLS
      167,936  C:\WINDOWS\SYSTEM\MSLS31.DLL
      166,029  C:\WINDOWS\SYSTEM\NDIS.VXD
      165,502  C:\WINDOWS\COMMAND\SCANREG.EXE
      165,437  C:\WINDOWS\SYSTEM\VREDIR.VXD
      165,424  C:\WINDOWS\SYSTEM32\DRIVERS\PORTCLS.SYS
      155,648  C:\WINDOWS\SYSTEM\OLEDLG.DLL
      155,648  C:\WINDOWS\SYSTEM\MPRSERV.DLL
      155,648  C:\WINDOWS\SYSTEM\GDI32.DLL
      155,424  C:\WINDOWS\WINFILE.EXE
      155,136  C:\WINDOWS\SYSTEM\COMMCTRL.DLL
      151,552  C:\WINDOWS\SYSTEM\MSOSS.DLL
      147,456  C:\WINDOWS\SYSTEM\USBUI.DLL
      143,818  C:\WINDOWS\COMMAND\SCANDISK.EXE
      139,640  C:\WINDOWS\FONTS\VERDANA.TTF
      139,264  C:\WINDOWS\WSCRIPT.EXE
      138,752  C:\WINDOWS\SYSTEM\JOY.CPL
      137,120  C:\WINDOWS\SYSTEM32\DRIVERS\KMIXER.SYS
      136,032  C:\WINDOWS\FONTS\VERDANAB.TTF
      135,168  C:\WINDOWS\COMMAND\CSCRIPT.EXE
      131,072  C:\WINDOWS\SIGVERIF.EXE
      129,080  C:\WINDOWS\LOGOW.SYS
      129,078  C:\WINDOWS\LOGOS.SYS
      127,040  C:\WINDOWS\SYSTEM\KRNL386.EXE
      126,704  C:\WINDOWS\SYSTEM\SHELL.DLL
      125,495  C:\WINDOWS\EMM386.EXE
      122,936  C:\WINDOWS\MSOWS409.DLL
      122,912  C:\WINDOWS\HWINFO.DAT
      118,784  C:\WINDOWS\SYSTEM\MSTASK.EXE
      118,784  C:\WINDOWS\REGEDIT.EXE
      118,752  C:\WINDOWS\FONTS\WEBDINGS.TTF
      115,068  C:\WINDOWS\FONTS\LUCON.TTF
      113,456  C:\WINDOWS\PROGMAN.EXE
      112,888  C:\WINDOWS\SYSTEM\VSERVER.VXD
      110,592  C:\WINDOWS\HWINFO.EXE
      108,528  C:\WINDOWS\SYSTEM\MMSYSTEM.DLL
      103,424  C:\WINDOWS\SYSTEM\MAIN.CPL
      103,424  C:\WINDOWS\EXTRAC32.EXE
      101,617  C:\WINDOWS\SYSTEM\VRTWD.386
       98,432  C:\WINDOWS\SYSTEM32\DRIVERS\KS.SYS
       98,336  C:\WINDOWS\USER.DAT
       94,208  C:\WINDOWS\SYSTEM\MSSHRUI.DLL
       93,890  C:\WINDOWS\COMMAND.COM
       93,248  C:\WINDOWS\SYSTEM\MODEM.CPL
       93,242  C:\WINDOWS\COMMAND\EXTRACT.EXE
       91,888  C:\WINDOWS\CHANNEL SCREEN SAVER.SCR
       90,869  C:\WINDOWS\SYSTEM\VNBT.386
       89,856  C:\WINDOWS\FONTS\SSERIFF.FON
       89,147  C:\WINDOWS\DOSREP.EXE
       88,544  C:\WINDOWS\SYSTEM\COMMDLG.DLL
       86,016  C:\WINDOWS\SYSTEM\MSWSOCK.DLL
       86,016  C:\WINDOWS\SYSTEM\ACTXPRXY.DLL
       86,016  C:\WINDOWS\SCANREGW.EXE
       84,416  C:\WINDOWS\MORICONS.DLL
       82,944  C:\WINDOWS\SYSTEM\OLECLI.DLL
       82,832  C:\WINDOWS\SYSTEM\PIFMGR.DLL
       81,920  C:\WINDOWS\SYSTEM\MSNP32.DLL
       81,744  C:\WINDOWS\FONTS\SERIFF.FON
       81,000  C:\WINDOWS\FONTS\WINGDING.TTF
       80,928  C:\WINDOWS\FONTS\SYMBOLF.FON
       80,385  C:\WINDOWS\SYSTEM\VIP.386
       77,824  C:\WINDOWS\SYSTEM\MSNET32.DLL
       77,824  C:\WINDOWS\CVTAPLOG.EXE
       76,704  C:\WINDOWS\DEFAULT.SF0
       73,728  C:\WINDOWS\SYSTEM\WS2_32.DLL
       73,728  C:\WINDOWS\SYSTEM\MYDOCS.DLL
       72,863  C:\WINDOWS\DEFAULT.SFC
       72,192  C:\WINDOWS\SYSTEM\APPWIZ.CPL
       70,656  C:\WINDOWS\SYSTEM\STICPL.CPL
       69,902  C:\WINDOWS\COMMAND\EDIT.COM
       69,632  C:\WINDOWS\SYSTEM\USER32.DLL
       69,570  C:\WINDOWS\SYSTEM\VMM32\IOS.VXD
       69,464  C:\WINDOWS\FONTS\SYMBOL.TTF
       68,096  C:\WINDOWS\SYSTEM32\DRIVERS\WDMAUD.SYS
       66,279  C:\WINDOWS\SYSTEM\VDHCP.386
       65,895  C:\WINDOWS\SYSTEM\PCI.VXD
       65,536  C:\WINDOWS\SYSTEM\WINMM.DLL
       65,536  C:\WINDOWS\SYSTEM\ADVAPI32.DLL
       65,536  C:\WINDOWS\MSNMGSR1.EXE
       64,656  C:\WINDOWS\FONTS\SSERIFE.FON
       63,916  C:\WINDOWS\COMMAND\FDISK.EXE
       62,224  C:\WINDOWS\SYSTEM\WINOA386.MOD
       61,440  C:\WINDOWS\SYSTEM\SHD401LC.DLL
       61,440  C:\WINDOWS\SYSTEM\RNR20.DLL
       61,440  C:\WINDOWS\ASD.EXE
       60,928  C:\WINDOWS\SYSTEM\INTL.CPL
       60,592  C:\WINDOWS\SYSTEM32\DRIVERS\UPDATE.SYS
       60,257  C:\WINDOWS\SYSTEM\VTCP.386
       59,539  C:\WINDOWS\SYSTEM\UNIMODEM.VXD
       59,184  C:\WINDOWS\SYSTEM\IOSUBSYS\AIC78XX.MPD
       59,133  C:\WINDOWS\SYSTEM\IOSUBSYS\CDFS.VXD
       58,870  C:\WINDOWS\COMMAND\EGA.CPI
       57,952  C:\WINDOWS\FONTS\SERIFE.FON
       57,654  C:\WINDOWS\WIN98SE1.BMP
       57,344  C:\WINDOWS\WUPDMGR.EXE
       57,344  C:\WINDOWS\UPWIZUN.EXE
       57,344  C:\WINDOWS\SYSTEM\WMICORE.DLL
       57,344  C:\WINDOWS\SYSTEM\MPR.DLL
       57,344  C:\WINDOWS\SETDEBUG.EXE
       57,344  C:\WINDOWS\CLSPACK.EXE
       56,880  C:\WINDOWS\NETDDE.EXE
       56,352  C:\WINDOWS\FONTS\SYMBOLE.FON
       56,259  C:\WINDOWS\SYSTEM\DSOUND.VXD
       55,488  C:\WINDOWS\GRPCONV.EXE
       53,552  C:\WINDOWS\SYSTEM\MSACM.DLL
       53,248  C:\WINDOWS\WINIPCFG.EXE
       53,248  C:\WINDOWS\NOTEPAD.EXE
       53,248  C:\WINDOWS\IPCONFIG.EXE
       53,248  C:\WINDOWS\INETMIB1.DLL
       52,656  C:\WINDOWS\SYSTEM32\DRIVERS\SWMIDI.SYS
       52,080  C:\WINDOWS\SYSTEM\VGA.DRV
       51,984  C:\WINDOWS\SYSTEM\POWERCFG.CPL
       49,575  C:\WINDOWS\COMMAND\FORMAT.COM
       49,152  C:\WINDOWS\TASKMAN.EXE
       49,152  C:\WINDOWS\SYSTEM\WMI.DLL
       47,104  C:\WINDOWS\SYSTEM\PASSWORD.CPL
       45,456  C:\WINDOWS\SYSTEM32\DRIVERS\SYSAUDIO.SYS
       45,379  C:\WINDOWS\SMARTDRV.EXE
       45,056  C:\WINDOWS\VCMUI.EXE
       45,056  C:\WINDOWS\SYSTEM\MSAFD.DLL
       45,056  C:\WINDOWS\SYSTEM\CFGMGR32.DLL
       45,056  C:\WINDOWS\SYSTEM\BROWSELC.DLL
       45,056  C:\WINDOWS\SYSTEM\BATMETER.DLL
       45,056  C:\WINDOWS\MSNCREAT.EXE
       45,056  C:\WINDOWS\FTP.EXE
       45,056  C:\WINDOWS\COMMAND\SULFNBK.EXE
       44,368  C:\WINDOWS\SYSTEM32\DRIVERS\HIDPARSE.SYS
       44,320  C:\WINDOWS\FONTS\DOSAPP.FON
       41,973  C:\WINDOWS\WININIT.EXE
       41,472  C:\WINDOWS\COMMAND\XCOPY32.MOD
       40,960  C:\WINDOWS\SYSTEM\WSOCK32.DLL
       40,960  C:\WINDOWS\SYSTEM\SECUR32.DLL
       40,960  C:\WINDOWS\SYSTEM\MSPWL32.DLL
       40,960  C:\WINDOWS\RG2CATDB.EXE
       40,960  C:\WINDOWS\PIDSET.EXE
       40,272  C:\WINDOWS\SYSTEM32\DRIVERS\USBAUDIO.SYS
       39,776  C:\WINDOWS\SYSTEM32\DRIVERS\STREAM.SYS
       39,506  C:\WINDOWS\SYSTEM\VNETBIOS.VXD
       38,400  C:\WINDOWS\SCRIPT.DOC
       37,632  C:\WINDOWS\SYSTEM\SHFOLDER.DLL
       37,523  C:\WINDOWS\SYSTEM\VPOWERD.VXD
       37,376  C:\WINDOWS\SYSTEM\TIMEDATE.CPL
       36,864  C:\WINDOWS\SYSTEM\LINKINFO.DLL
       36,864  C:\WINDOWS\HH.EXE
       36,112  C:\WINDOWS\SYSTEM32\DRIVERS\SBEMUL.SYS
       35,872  C:\WINDOWS\SYSTEM\VJOYD.VXD
       35,680  C:\WINDOWS\SYSTEM32\DRIVERS\USBHUB.SYS
       35,572  C:\WINDOWS\SYSTEM\LPT.VXD
       34,676  C:\WINDOWS\SYSTEM\UNICODE.NLS
       34,566  C:\WINDOWS\COMMAND\KEYBOARD.SYS
       34,543  C:\WINDOWS\NBTSTAT.EXE
       33,191  C:\WINDOWS\HIMEM.SYS
       32,768  C:\WINDOWS\SYSTEM\SYSTRAY.EXE
       32,768  C:\WINDOWS\SYSTEM\SVRAPI.DLL
       32,768  C:\WINDOWS\SNMPAPI.DLL
       32,768  C:\WINDOWS\ROUTE.EXE
       32,768  C:\WINDOWS\NETSTAT.EXE
       32,768  C:\WINDOWS\MM2ENT.EXE
       32,419  C:\WINDOWS\SYSTEM\IOSUBSYS\CDVSD.VXD
       32,240  C:\WINDOWS\SYSTEM\DDEML.DLL
       32,146  C:\WINDOWS\COMMAND\MEM.EXE
       31,942  C:\WINDOWS\COMMAND\KEYBRD2.SYS
       31,744  C:\WINDOWS\FONTS\COURF.FON
       31,680  C:\WINDOWS\SYSTEM32\DRIVERS\CCPORT.SYS
       31,633  C:\WINDOWS\COMMAND\KEYBRD3.SYS
       30,742  C:\WINDOWS\COMMAND\COUNTRY.SYS
       30,448  C:\WINDOWS\SYSTEM32\DRIVERS\UHCD.SYS
       30,389  C:\WINDOWS\SYSTEM\DDRAW.VXD
       30,193  C:\WINDOWS\SYSTEM\BIOS.VXD
       29,820  C:\WINDOWS\SYSTEM\RTL8139.SYS
       29,497  C:\WINDOWS\SYSTEM\IOSUBSYS\APIX.VXD
       29,271  C:\WINDOWS\COMMAND\MODE.COM
       29,168  C:\WINDOWS\SYSTEM\MSIDLE.DLL
       28,672  C:\WINDOWS\TASKMON.EXE
       28,672  C:\WINDOWS\SYSTEM\NETBIOS.DLL
       28,672  C:\WINDOWS\SYSTEM\MPREXE.EXE
       28,672  C:\WINDOWS\COMMAND\START.EXE
       28,672  C:\WINDOWS\ARP.EXE
       28,096  C:\WINDOWS\COMMAND\CHKDSK.EXE
       27,600  C:\WINDOWS\WINPOPUP.EXE
       27,299  C:\WINDOWS\COMMAND\MOVE.EXE
       25,882  C:\WINDOWS\COMMAND\SORT.EXE
       25,741  C:\WINDOWS\SYSTEM\IOSUBSYS\HSFLOP.PDR
       25,473  C:\WINDOWS\COMMAND\MSCDEX.EXE
       25,106  C:\WINDOWS\SYSTEM\VGARTD.VXD
       24,791  C:\WINDOWS\WIN.COM
       24,626  C:\WINDOWS\CMD640X.SYS
       24,576  C:\WINDOWS\SYSTEM\WS2HELP.DLL
       24,576  C:\WINDOWS\SYSTEM\VERSION.DLL
       24,576  C:\WINDOWS\SYSTEM\POWRPROF.DLL
       24,576  C:\WINDOWS\SYSTEM\LZ32.DLL
       24,576  C:\WINDOWS\RUNDLL32.EXE
       24,576  C:\WINDOWS\PING.EXE
       24,527  C:\WINDOWS\SYSTEM\AFVXD.VXD
       24,406  C:\WINDOWS\SYSTEM\IOSUBSYS\ESDI_506.PDR
       24,352  C:\WINDOWS\FONTS\SMALLE.FON
       24,064  C:\WINDOWS\SYSTEM\OLESVR.DLL
       24,064  C:\WINDOWS\SYSTEM\M_CTRL.DLL
       23,744  C:\WINDOWS\SYSTEM\NDIS2SUP.VXD
       23,696  C:\WINDOWS\SYSTEM\LZEXPAND.DLL
       23,650  C:\WINDOWS\SYSTEM\IOSUBSYS\SCSIPORT.PDR
       23,520  C:\WINDOWS\SYSTEM32\DRIVERS\HIDCLASS.SYS
       23,440  C:\WINDOWS\SYSTEM\MSACM.DRV
       23,424  C:\WINDOWS\FONTS\COURE.FON
       23,183  C:\WINDOWS\SYSTEM\WSOCK2.VXD
       23,102  C:\WINDOWS\SYSTEM\PARALINK.VXD
       23,040  C:\WINDOWS\SYSTEM\WINSPOOL.DRV
       23,029  C:\WINDOWS\SYSTEM\FILESEC.VXD
       21,975  C:\WINDOWS\COMMAND\DISKCOPY.COM
       21,661  C:\WINDOWS\SYSTEM\MSSP.VXD
       21,504  C:\WINDOWS\WINSOCK.DLL
       21,303  C:\WINDOWS\SYSTEM\DFS.VXD
       21,281  C:\WINDOWS\SYSTEM\ISAPNP.VXD
       20,901  C:\WINDOWS\CMD640X2.SYS
       20,653  C:\WINDOWS\SYSTEM\VUDP.386
       20,574  C:\WINDOWS\COMMAND\FC.EXE
       20,554  C:\WINDOWS\COMMAND\DEBUG.EXE
       20,480  C:\WINDOWS\TRACERT.EXE
       20,480  C:\WINDOWS\SYSTEM\NTDLL.DLL
       20,480  C:\WINDOWS\SYSTEM\NETAPI32.DLL
       20,334  C:\WINDOWS\SYSTEM\PTVCD.VXD
       20,228  C:\WINDOWS\SYSTEM\SERENUM.VXD
       19,927  C:\WINDOWS\COMMAND\KEYB.COM
       19,632  C:\WINDOWS\FONTS\SMALLF.FON
       19,270  C:\WINDOWS\SYSTEM\IOSUBSYS\SCSI1HLP.VXD
       19,083  C:\WINDOWS\COMMAND\DELTREE.EXE
       18,967  C:\WINDOWS\COMMAND\SYS.COM
       18,939  C:\WINDOWS\SETVER.EXE
       18,912  C:\WINDOWS\SYSTEM32\DRIVERS\USBD.SYS
       18,809  C:\WINDOWS\SYSTEM\IOSUBSYS\DISKTSD.VXD
       18,625  C:\WINDOWS\SYSTEM\SERIAL.VXD
       18,585  C:\WINDOWS\SYSTEM\MSGAME.VXD
       18,576  C:\WINDOWS\SYSTEM\CSPMAN.DLL
       18,491  C:\WINDOWS\SYSTEM\IOSUBSYS\VOLTRACK.VXD
       18,296  C:\WINDOWS\SYSTEM\SERWAVE.VXD
       17,986  C:\WINDOWS\SYSTEM\SMARTVSD.VXD
       17,904  C:\WINDOWS\COMMAND\SUBST.EXE
       17,655  C:\WINDOWS\COMMAND\IEXTRACT.EXE
       17,631  C:\WINDOWS\SYSTEM\VNETSUP.VXD
       17,412  C:\WINDOWS\FONTS\MARLETT.TTF
       17,208  C:\WINDOWS\SYSTEM\LPTENUM.VXD
       17,175  C:\WINDOWS\COMMAND\DISPLAY.SYS
       16,986  C:\WINDOWS\SYSTEM\DINPUT.VXD
       16,400  C:\WINDOWS\SYSTEM\SYSTHUNK.DLL
       16,384  C:\WINDOWS\SYSTEM\WMIEXE.EXE
       16,384  C:\WINDOWS\SYSTEM\IMM32.DLL
       15,809  C:\WINDOWS\SYSTEM\MSMOUSE.VXD
       15,527  C:\WINDOWS\SYSTEM\WSOCK.VXD
       15,495  C:\WINDOWS\COMMAND\DOSKEY.COM
       15,252  C:\WINDOWS\COMMAND\ATTRIB.EXE
       14,848  C:\WINDOWS\SYSTEM\TELEPHON.CPL
       14,800  C:\WINDOWS\SYSTEM32\DRIVERS\WMIDRV.SYS
       14,696  C:\WINDOWS\SYSTEM\CONAGENT.EXE
       14,624  C:\WINDOWS\SYSTEM\VGAFULL.3GR
       14,448  C:\WINDOWS\SYSTEM\NETCPL.CPL
       14,032  C:\WINDOWS\NDDEAPI.DLL
       13,940  C:\WINDOWS\SYSTEM\MMDEVLDR.VXD
       13,884  C:\WINDOWS\SYSTEM\IOSUBSYS\CDTSD.VXD
       13,242  C:\WINDOWS\SYSTEM\IOSUBSYS\RMM.PDR
       13,014  C:\WINDOWS\COMMAND\KEYBRD4.SYS
       13,011  C:\WINDOWS\SYSTEM\NDISWAN.VXD
       12,838  C:\WINDOWS\SYSTEM\SW3DPRO2.VXD
       12,688  C:\WINDOWS\SYSTEM\KEYBOARD.DRV
       12,496  C:\WINDOWS\SYSTEM\VER.DLL
       12,472  C:\WINDOWS\SYSTEM\LOGGER.VXD
       12,327  C:\WINDOWS\IOS.INI
       12,288  C:\WINDOWS\FONTS\8514OEM.FON
       12,112  C:\WINDOWS\SYSTEM\TOOLHELP.DLL
       12,101  C:\WINDOWS\SYSTEM\MSANALOG.VXD
       11,920  C:\WINDOWS\SYSTEM\MSGSRV32.EXE
       11,832  C:\WINDOWS\SYSTEM\SWGAMPAD.VXD
       11,830  C:\WINDOWS\SYSTEM\SW3DPRO.VXD
       11,311  C:\WINDOWS\SYSTEM\IOSUBSYS\ATAPCHNG.VXD
       11,306  C:\WINDOWS\CLOUD.GIF
       11,067  C:\WINDOWS\SYSTEM\IOSUBSYS\TORISAN3.VXD
       10,992  C:\WINDOWS\SYSTEM\IOSCLASS.DLL
       10,992  C:\WINDOWS\FONTS\8514FIX.FON
       10,982  C:\WINDOWS\SYSTEM\HWINFOD.VXD
       10,976  C:\WINDOWS\NDDENB.DLL
       10,720  C:\WINDOWS\SYSTEM\FIOLOG.VXD
       10,471  C:\WINDOWS\COMMAND\MORE.COM
       10,194  C:\WINDOWS\SYSTEM\IOSUBSYS\DISKVSD.VXD
        9,952  C:\WINDOWS\SYSTEM\IOSUBSYS\BIGMEM.DRV
        9,926  C:\WINDOWS\SYSTEM\IOSUBSYS\NECATAPI.VXD
        9,917  C:\WINDOWS\SYSTEM\WSHTCP.VXD
        9,866  C:\WINDOWS\SYSTEM\CP_1252.NLS
        9,802  C:\WINDOWS\SYSTEM\SAGE.VXD
        9,792  C:\WINDOWS\SYSTEM\VMM32\QEMMFIX.VXD
        9,719  C:\WINDOWS\COMMAND\ANSI.SYS
        9,600  C:\WINDOWS\FONTS\8514SYS.FON
        9,324  C:\WINDOWS\COMMAND\LABEL.EXE
        8,648  C:\WINDOWS\SYSTEM\CP_437.NLS
        7,968  C:\WINDOWS\FONTS\MODERN.FON
        7,885  C:\WINDOWS\NETDET.INI
        7,743  C:\WINDOWS\SYSTEM\ASPIENUM.VXD
        7,712  C:\WINDOWS\SYSTEM\MOUSE.DRV
        7,329  C:\WINDOWS\COMMAND\SCANDISK.INI
        7,315  C:\WINDOWS\SYSTEM\JAVASUP.VXD
        7,296  C:\WINDOWS\FONTS\VGASYS.FON
        6,940  C:\WINDOWS\COMMAND\NLSFUNC.EXE
        6,658  C:\WINDOWS\COMMAND\FIND.EXE
        6,653  C:\WINDOWS\WIN.INI
        6,550  C:\WINDOWS\JAUTOEXP.DAT
        6,417  C:\WINDOWS\SYSTEM\VFIXD.VXD
        6,208  C:\WINDOWS\SYSTEM\SETUP4.DLL
        6,007  C:\WINDOWS\SERVICES
        5,935  C:\WINDOWS\GENERIC.CPE
        5,872  C:\WINDOWS\SYSTEM\COMM.DRV
        5,859  C:\WINDOWS\SYSTEM\VFD.VXD
        5,691  C:\WINDOWS\SYSTEM\VTDI.386
        5,672  C:\WINDOWS\SYSTEM\QUARTZ.VXD
        5,664  C:\WINDOWS\SYSTEM32\DRIVERS\REDBOOK.SYS
        5,376  C:\WINDOWS\FONTS\VGAFIX.FON
        5,239  C:\WINDOWS\COMMAND\CHOICE.COM
        5,232  C:\WINDOWS\FONTS\VGA850.FON
        5,186  C:\WINDOWS\SYSTEM\WDMMDMLD.VXD
        5,168  C:\WINDOWS\FONTS\VGAOEM.FON
        5,088  C:\WINDOWS\SYSTEM32\DRIVERS\HIDVKD.SYS
        5,068  C:\WINDOWS\DELETEFI.INI
        4,960  C:\WINDOWS\RUNDLL.EXE
        4,896  C:\WINDOWS\SCANDSKW.EXE
        4,473  C:\WINDOWS\FYI.CPE
        4,357  C:\WINDOWS\CONFDENT.CPE
        4,345  C:\WINDOWS\URGENT.CPE
        4,064  C:\WINDOWS\SYSTEM32\DRIVERS\WDMFS.SYS
        3,878  C:\WINDOWS\COMMAND\XCOPY32.EXE
        3,878  C:\WINDOWS\COMMAND\XCOPY.EXE
        3,717  C:\WINDOWS\LMHOSTS.SAM
        3,708  C:\WINDOWS\IFSHLP.SYS
        3,648  C:\WINDOWS\WINVER.EXE
        3,600  C:\WINDOWS\SYSTEM32\DRIVERS\WMILIB.SYS
        3,296  C:\WINDOWS\SYSTEM32\DRIVERS\SWENUM.SYS
        3,216  C:\WINDOWS\HIDCI.DLL
        2,614  C:\WINDOWS\DBLBUFF.SYS
        2,416  C:\WINDOWS\WINHELP.EXE
        2,336  C:\WINDOWS\SYSTEM\MSJSTICK.DRV
        2,288  C:\WINDOWS\SYSTEM\SYSTEM.DRV
        2,118  C:\WINDOWS\BUBBLES.BMP
        2,112  C:\WINDOWS\CONTROL.EXE
        2,047  C:\WINDOWS\COMMAND\BOOTDISK.BAT
        1,920  C:\WINDOWS\SYSTEM\POWER.DRV
        1,813  C:\WINDOWS\WINLOGO.GIF
        1,619  C:\WINDOWS\SYSTEM.INI
        1,603  C:\WINDOWS\HLPGLOBE.GIF
        1,518  C:\WINDOWS\1STBOOT.BMP
        1,492  C:\WINDOWS\HLPCD.GIF
        1,407  C:\WINDOWS\HLPBELL.GIF
        1,405  C:\WINDOWS\MSDFMAP.INI
        1,249  C:\WINDOWS\HLPSTEP3.GIF
        1,185  C:\WINDOWS\HLPLOGO.GIF
        1,184  C:\WINDOWS\SYSTEM\MMTASK.TSK
        1,154  C:\WINDOWS\HLPSTEP2.GIF
        1,107  C:\WINDOWS\HLPSTEP1.GIF
        1,105  C:\WINDOWS\ASPI2HLP.SYS
          967  C:\WINDOWS\DESKTOP\CONSOLE.PIF
          897  C:\WINDOWS\SCHEDLOG.TXT
          865  C:\WINDOWS\DOSREP.INI
          833  C:\WINDOWS\CONTROL.INI
          800  C:\WINDOWS\PROTOCOL
          787  C:\WINDOWS\SCANREG.INI
          736  C:\WINDOWS\HOSTS.SAM
          688  C:\WINDOWS\KANYABUM.PWL
          590  C:\WINDOWS\STRAW MAT.BMP
          582  C:\WINDOWS\CARVED STONE.BMP
          578  C:\WINDOWS\TILES.BMP
          578  C:\WINDOWS\PINSTRIPE.BMP
          407  C:\WINDOWS\NETWORKS
          398  C:\WINDOWS\SYSTEM\KBDUS.KBD
          380  C:\WINDOWS\START MENU\PROGRAMS\ACCESSORIES\SYSTEM TOOLS\SCHEDULED TASKS.LNK
          303  C:\WINDOWS\START MENU\PROGRAMS\WINDOWS EXPLORER.LNK
          284  C:\WINDOWS\START MENU\PROGRAMS\ACCESSORIES\SYSTEM TOOLS\SCANDISK.LNK
          278  C:\WINDOWS\START MENU\PROGRAMS\ACCESSORIES\SYSTEM TOOLS\DISK DEFRAGMENTER.LNK
          278  C:\WINDOWS\START MENU\PROGRAMS\ACCESSORIES\NOTEPAD.LNK
          248  C:\WINDOWS\CONTENT.GIF
          198  C:\WINDOWS\TRIANGLES.BMP
          194  C:\WINDOWS\BLUE RIVETS.BMP
          190  C:\WINDOWS\WAVES.BMP
          190  C:\WINDOWS\CIRCLES.BMP
          182  C:\WINDOWS\BLACK THATCH.BMP
          138  C:\WINDOWS\CTPNP.CFG
          120  C:\WINDOWS\PROTOCOL.INI
           86  C:\WINDOWS\SYSTEM.CB



  List of files in the minimum Win9X directory (alphabetic order)


        1,518  C:\WINDOWS\1STBOOT.BMP
       28,672  C:\WINDOWS\ARP.EXE
       61,440  C:\WINDOWS\ASD.EXE
        1,105  C:\WINDOWS\ASPI2HLP.SYS
          182  C:\WINDOWS\BLACK THATCH.BMP
          194  C:\WINDOWS\BLUE RIVETS.BMP
        2,118  C:\WINDOWS\BUBBLES.BMP
          582  C:\WINDOWS\CARVED STONE.BMP
       91,888  C:\WINDOWS\CHANNEL SCREEN SAVER.SCR
          190  C:\WINDOWS\CIRCLES.BMP
       11,306  C:\WINDOWS\CLOUD.GIF
       57,344  C:\WINDOWS\CLSPACK.EXE
       24,626  C:\WINDOWS\CMD640X.SYS
       20,901  C:\WINDOWS\CMD640X2.SYS
       93,890  C:\WINDOWS\COMMAND.COM
        4,357  C:\WINDOWS\CONFDENT.CPE
          248  C:\WINDOWS\CONTENT.GIF
        2,112  C:\WINDOWS\CONTROL.EXE
          833  C:\WINDOWS\CONTROL.INI
          138  C:\WINDOWS\CTPNP.CFG
       77,824  C:\WINDOWS\CVTAPLOG.EXE
        2,614  C:\WINDOWS\DBLBUFF.SYS
       76,704  C:\WINDOWS\DEFAULT.SF0
       72,863  C:\WINDOWS\DEFAULT.SFC
        5,068  C:\WINDOWS\DELETEFI.INI
       89,147  C:\WINDOWS\DOSREP.EXE
          865  C:\WINDOWS\DOSREP.INI
      125,495  C:\WINDOWS\EMM386.EXE
      180,224  C:\WINDOWS\EXPLORER.EXE
      103,424  C:\WINDOWS\EXTRAC32.EXE
       45,056  C:\WINDOWS\FTP.EXE
        4,473  C:\WINDOWS\FYI.CPE
        5,935  C:\WINDOWS\GENERIC.CPE
       55,488  C:\WINDOWS\GRPCONV.EXE
       36,864  C:\WINDOWS\HH.EXE
        3,216  C:\WINDOWS\HIDCI.DLL
       33,191  C:\WINDOWS\HIMEM.SYS
        1,407  C:\WINDOWS\HLPBELL.GIF
        1,492  C:\WINDOWS\HLPCD.GIF
        1,603  C:\WINDOWS\HLPGLOBE.GIF
        1,185  C:\WINDOWS\HLPLOGO.GIF
        1,107  C:\WINDOWS\HLPSTEP1.GIF
        1,154  C:\WINDOWS\HLPSTEP2.GIF
        1,249  C:\WINDOWS\HLPSTEP3.GIF
          736  C:\WINDOWS\HOSTS.SAM
      122,912  C:\WINDOWS\HWINFO.DAT
      110,592  C:\WINDOWS\HWINFO.EXE
        3,708  C:\WINDOWS\IFSHLP.SYS
       53,248  C:\WINDOWS\INETMIB1.DLL
       12,327  C:\WINDOWS\IOS.INI
       53,248  C:\WINDOWS\IPCONFIG.EXE
        6,550  C:\WINDOWS\JAUTOEXP.DAT
          688  C:\WINDOWS\KANYABUM.PWL
        3,717  C:\WINDOWS\LMHOSTS.SAM
      129,078  C:\WINDOWS\LOGOS.SYS
      129,080  C:\WINDOWS\LOGOW.SYS
       32,768  C:\WINDOWS\MM2ENT.EXE
       84,416  C:\WINDOWS\MORICONS.DLL
        1,405  C:\WINDOWS\MSDFMAP.INI
       45,056  C:\WINDOWS\MSNCREAT.EXE
       65,536  C:\WINDOWS\MSNMGSR1.EXE
      122,936  C:\WINDOWS\MSOWS409.DLL
       34,543  C:\WINDOWS\NBTSTAT.EXE
       14,032  C:\WINDOWS\NDDEAPI.DLL
       10,976  C:\WINDOWS\NDDENB.DLL
      356,134  C:\WINDOWS\NET.EXE
       56,880  C:\WINDOWS\NETDDE.EXE
        7,885  C:\WINDOWS\NETDET.INI
       32,768  C:\WINDOWS\NETSTAT.EXE
          407  C:\WINDOWS\NETWORKS
       53,248  C:\WINDOWS\NOTEPAD.EXE
       40,960  C:\WINDOWS\PIDSET.EXE
       24,576  C:\WINDOWS\PING.EXE
          578  C:\WINDOWS\PINSTRIPE.BMP
      113,456  C:\WINDOWS\PROGMAN.EXE
          800  C:\WINDOWS\PROTOCOL
          120  C:\WINDOWS\PROTOCOL.INI
      118,784  C:\WINDOWS\REGEDIT.EXE
       40,960  C:\WINDOWS\RG2CATDB.EXE
       32,768  C:\WINDOWS\ROUTE.EXE
        4,960  C:\WINDOWS\RUNDLL.EXE
       24,576  C:\WINDOWS\RUNDLL32.EXE
        4,896  C:\WINDOWS\SCANDSKW.EXE
          787  C:\WINDOWS\SCANREG.INI
       86,016  C:\WINDOWS\SCANREGW.EXE
          897  C:\WINDOWS\SCHEDLOG.TXT
       38,400  C:\WINDOWS\SCRIPT.DOC
        6,007  C:\WINDOWS\SERVICES
       57,344  C:\WINDOWS\SETDEBUG.EXE
       18,939  C:\WINDOWS\SETVER.EXE
      131,072  C:\WINDOWS\SIGVERIF.EXE
       45,379  C:\WINDOWS\SMARTDRV.EXE
       32,768  C:\WINDOWS\SNMPAPI.DLL
          590  C:\WINDOWS\STRAW MAT.BMP
           86  C:\WINDOWS\SYSTEM.CB
    2,158,624  C:\WINDOWS\SYSTEM.DAT
        1,619  C:\WINDOWS\SYSTEM.INI
       49,152  C:\WINDOWS\TASKMAN.EXE
       28,672  C:\WINDOWS\TASKMON.EXE
          578  C:\WINDOWS\TILES.BMP
       20,480  C:\WINDOWS\TRACERT.EXE
          198  C:\WINDOWS\TRIANGLES.BMP
       57,344  C:\WINDOWS\UPWIZUN.EXE
        4,345  C:\WINDOWS\URGENT.CPE
       98,336  C:\WINDOWS\USER.DAT
       45,056  C:\WINDOWS\VCMUI.EXE
          190  C:\WINDOWS\WAVES.BMP
       24,791  C:\WINDOWS\WIN.COM
        6,653  C:\WINDOWS\WIN.INI
       57,654  C:\WINDOWS\WIN98SE1.BMP
      155,424  C:\WINDOWS\WINFILE.EXE
        2,416  C:\WINDOWS\WINHELP.EXE
       41,973  C:\WINDOWS\WININIT.EXE
       53,248  C:\WINDOWS\WINIPCFG.EXE
        1,813  C:\WINDOWS\WINLOGO.GIF
       27,600  C:\WINDOWS\WINPOPUP.EXE
      438,272  C:\WINDOWS\WINREP.EXE
       21,504  C:\WINDOWS\WINSOCK.DLL
        3,648  C:\WINDOWS\WINVER.EXE
      139,264  C:\WINDOWS\WSCRIPT.EXE
       57,344  C:\WINDOWS\WUPDMGR.EXE

        9,719  C:\WINDOWS\COMMAND\ANSI.SYS
       15,252  C:\WINDOWS\COMMAND\ATTRIB.EXE
        2,047  C:\WINDOWS\COMMAND\BOOTDISK.BAT
       28,096  C:\WINDOWS\COMMAND\CHKDSK.EXE
        5,239  C:\WINDOWS\COMMAND\CHOICE.COM
       30,742  C:\WINDOWS\COMMAND\COUNTRY.SYS
      135,168  C:\WINDOWS\COMMAND\CSCRIPT.EXE
       20,554  C:\WINDOWS\COMMAND\DEBUG.EXE
       19,083  C:\WINDOWS\COMMAND\DELTREE.EXE
       21,975  C:\WINDOWS\COMMAND\DISKCOPY.COM
       17,175  C:\WINDOWS\COMMAND\DISPLAY.SYS
       15,495  C:\WINDOWS\COMMAND\DOSKEY.COM
       69,902  C:\WINDOWS\COMMAND\EDIT.COM
       58,870  C:\WINDOWS\COMMAND\EGA.CPI
       93,242  C:\WINDOWS\COMMAND\EXTRACT.EXE
       20,574  C:\WINDOWS\COMMAND\FC.EXE
       63,916  C:\WINDOWS\COMMAND\FDISK.EXE
        6,658  C:\WINDOWS\COMMAND\FIND.EXE
       49,575  C:\WINDOWS\COMMAND\FORMAT.COM
       17,655  C:\WINDOWS\COMMAND\IEXTRACT.EXE
       19,927  C:\WINDOWS\COMMAND\KEYB.COM
       34,566  C:\WINDOWS\COMMAND\KEYBOARD.SYS
       31,942  C:\WINDOWS\COMMAND\KEYBRD2.SYS
       31,633  C:\WINDOWS\COMMAND\KEYBRD3.SYS
       13,014  C:\WINDOWS\COMMAND\KEYBRD4.SYS
        9,324  C:\WINDOWS\COMMAND\LABEL.EXE
       32,146  C:\WINDOWS\COMMAND\MEM.EXE
       29,271  C:\WINDOWS\COMMAND\MODE.COM
       10,471  C:\WINDOWS\COMMAND\MORE.COM
       27,299  C:\WINDOWS\COMMAND\MOVE.EXE
       25,473  C:\WINDOWS\COMMAND\MSCDEX.EXE
        6,940  C:\WINDOWS\COMMAND\NLSFUNC.EXE
      143,818  C:\WINDOWS\COMMAND\SCANDISK.EXE
        7,329  C:\WINDOWS\COMMAND\SCANDISK.INI
      165,502  C:\WINDOWS\COMMAND\SCANREG.EXE
       25,882  C:\WINDOWS\COMMAND\SORT.EXE
       28,672  C:\WINDOWS\COMMAND\START.EXE
       17,904  C:\WINDOWS\COMMAND\SUBST.EXE
       45,056  C:\WINDOWS\COMMAND\SULFNBK.EXE
       18,967  C:\WINDOWS\COMMAND\SYS.COM
        3,878  C:\WINDOWS\COMMAND\XCOPY.EXE
        3,878  C:\WINDOWS\COMMAND\XCOPY32.EXE
       41,472  C:\WINDOWS\COMMAND\XCOPY32.MOD

       10,992  C:\WINDOWS\FONTS\8514FIX.FON
       12,288  C:\WINDOWS\FONTS\8514OEM.FON
        9,600  C:\WINDOWS\FONTS\8514SYS.FON
      273,020  C:\WINDOWS\FONTS\ARIAL.TTF
      297,660  C:\WINDOWS\FONTS\COUR.TTF
       23,424  C:\WINDOWS\FONTS\COURE.FON
       31,744  C:\WINDOWS\FONTS\COURF.FON
       44,320  C:\WINDOWS\FONTS\DOSAPP.FON
      115,068  C:\WINDOWS\FONTS\LUCON.TTF
       17,412  C:\WINDOWS\FONTS\MARLETT.TTF
        7,968  C:\WINDOWS\FONTS\MODERN.FON
       57,952  C:\WINDOWS\FONTS\SERIFE.FON
       81,744  C:\WINDOWS\FONTS\SERIFF.FON
       24,352  C:\WINDOWS\FONTS\SMALLE.FON
       19,632  C:\WINDOWS\FONTS\SMALLF.FON
       64,656  C:\WINDOWS\FONTS\SSERIFE.FON
       89,856  C:\WINDOWS\FONTS\SSERIFF.FON
       69,464  C:\WINDOWS\FONTS\SYMBOL.TTF
       56,352  C:\WINDOWS\FONTS\SYMBOLE.FON
       80,928  C:\WINDOWS\FONTS\SYMBOLF.FON
      249,012  C:\WINDOWS\FONTS\TAHOMA.TTF
      322,824  C:\WINDOWS\FONTS\TIMES.TTF
      139,640  C:\WINDOWS\FONTS\VERDANA.TTF
      136,032  C:\WINDOWS\FONTS\VERDANAB.TTF
        5,232  C:\WINDOWS\FONTS\VGA850.FON
        5,376  C:\WINDOWS\FONTS\VGAFIX.FON
        5,168  C:\WINDOWS\FONTS\VGAOEM.FON
        7,296  C:\WINDOWS\FONTS\VGASYS.FON
      118,752  C:\WINDOWS\FONTS\WEBDINGS.TTF
       81,000  C:\WINDOWS\FONTS\WINGDING.TTF


       86,016  C:\WINDOWS\SYSTEM\ACTXPRXY.DLL
       65,536  C:\WINDOWS\SYSTEM\ADVAPI32.DLL
       24,527  C:\WINDOWS\SYSTEM\AFVXD.VXD
       72,192  C:\WINDOWS\SYSTEM\APPWIZ.CPL
        7,743  C:\WINDOWS\SYSTEM\ASPIENUM.VXD
       45,056  C:\WINDOWS\SYSTEM\BATMETER.DLL
       30,193  C:\WINDOWS\SYSTEM\BIOS.VXD
       45,056  C:\WINDOWS\SYSTEM\BROWSELC.DLL
      803,088  C:\WINDOWS\SYSTEM\BROWSEUI.DLL
       45,056  C:\WINDOWS\SYSTEM\CFGMGR32.DLL
      577,808  C:\WINDOWS\SYSTEM\COMCTL32.DLL
      176,128  C:\WINDOWS\SYSTEM\COMDLG32.DLL
        5,872  C:\WINDOWS\SYSTEM\COMM.DRV
      155,136  C:\WINDOWS\SYSTEM\COMMCTRL.DLL
       88,544  C:\WINDOWS\SYSTEM\COMMDLG.DLL
       14,696  C:\WINDOWS\SYSTEM\CONAGENT.EXE
      373,643  C:\WINDOWS\SYSTEM\COOL.DLL
        9,866  C:\WINDOWS\SYSTEM\CP_1252.NLS
        8,648  C:\WINDOWS\SYSTEM\CP_437.NLS
      385,024  C:\WINDOWS\SYSTEM\CRYPT32.DLL
       18,576  C:\WINDOWS\SYSTEM\CSPMAN.DLL
       32,240  C:\WINDOWS\SYSTEM\DDEML.DLL
       30,389  C:\WINDOWS\SYSTEM\DDRAW.VXD
      221,280  C:\WINDOWS\SYSTEM\DESK.CPL
       21,303  C:\WINDOWS\SYSTEM\DFS.VXD
      202,800  C:\WINDOWS\SYSTEM\DIBENG.DLL
       16,986  C:\WINDOWS\SYSTEM\DINPUT.VXD
      215,056  C:\WINDOWS\SYSTEM\DSKMAINT.DLL
       56,259  C:\WINDOWS\SYSTEM\DSOUND.VXD
       23,029  C:\WINDOWS\SYSTEM\FILESEC.VXD
       10,720  C:\WINDOWS\SYSTEM\FIOLOG.VXD
      345,584  C:\WINDOWS\SYSTEM\GDI.EXE
      155,648  C:\WINDOWS\SYSTEM\GDI32.DLL
       10,982  C:\WINDOWS\SYSTEM\HWINFOD.VXD
       16,384  C:\WINDOWS\SYSTEM\IMM32.DLL
      276,672  C:\WINDOWS\SYSTEM\INETCPL.CPL
       60,928  C:\WINDOWS\SYSTEM\INTL.CPL
       10,992  C:\WINDOWS\SYSTEM\IOSCLASS.DLL
       21,281  C:\WINDOWS\SYSTEM\ISAPNP.VXD
        7,315  C:\WINDOWS\SYSTEM\JAVASUP.VXD
      138,752  C:\WINDOWS\SYSTEM\JOY.CPL
          398  C:\WINDOWS\SYSTEM\KBDUS.KBD
      471,040  C:\WINDOWS\SYSTEM\KERNEL32.DLL
       12,688  C:\WINDOWS\SYSTEM\KEYBOARD.DRV
      127,040  C:\WINDOWS\SYSTEM\KRNL386.EXE
       36,864  C:\WINDOWS\SYSTEM\LINKINFO.DLL
      174,996  C:\WINDOWS\SYSTEM\LOCALE.NLS
       12,472  C:\WINDOWS\SYSTEM\LOGGER.VXD
       35,572  C:\WINDOWS\SYSTEM\LPT.VXD
       17,208  C:\WINDOWS\SYSTEM\LPTENUM.VXD
       24,576  C:\WINDOWS\SYSTEM\LZ32.DLL
       23,696  C:\WINDOWS\SYSTEM\LZEXPAND.DLL
      103,424  C:\WINDOWS\SYSTEM\MAIN.CPL
      491,792  C:\WINDOWS\SYSTEM\MLANG.DLL
       13,940  C:\WINDOWS\SYSTEM\MMDEVLDR.VXD
      108,528  C:\WINDOWS\SYSTEM\MMSYSTEM.DLL
        1,184  C:\WINDOWS\SYSTEM\MMTASK.TSK
       93,248  C:\WINDOWS\SYSTEM\MODEM.CPL
        7,712  C:\WINDOWS\SYSTEM\MOUSE.DRV
       57,344  C:\WINDOWS\SYSTEM\MPR.DLL
       28,672  C:\WINDOWS\SYSTEM\MPREXE.EXE
      155,648  C:\WINDOWS\SYSTEM\MPRSERV.DLL
       53,552  C:\WINDOWS\SYSTEM\MSACM.DLL
       23,440  C:\WINDOWS\SYSTEM\MSACM.DRV
       45,056  C:\WINDOWS\SYSTEM\MSAFD.DLL
       12,101  C:\WINDOWS\SYSTEM\MSANALOG.VXD
       18,585  C:\WINDOWS\SYSTEM\MSGAME.VXD
       11,920  C:\WINDOWS\SYSTEM\MSGSRV32.EXE
       29,168  C:\WINDOWS\SYSTEM\MSIDLE.DLL
        2,336  C:\WINDOWS\SYSTEM\MSJSTICK.DRV
      167,936  C:\WINDOWS\SYSTEM\MSLS31.DLL
       15,809  C:\WINDOWS\SYSTEM\MSMOUSE.VXD
       77,824  C:\WINDOWS\SYSTEM\MSNET32.DLL
       81,920  C:\WINDOWS\SYSTEM\MSNP32.DLL
      151,552  C:\WINDOWS\SYSTEM\MSOSS.DLL
       40,960  C:\WINDOWS\SYSTEM\MSPWL32.DLL
       94,208  C:\WINDOWS\SYSTEM\MSSHRUI.DLL
       21,661  C:\WINDOWS\SYSTEM\MSSP.VXD
      245,760  C:\WINDOWS\SYSTEM\MSTASK.DLL
      118,784  C:\WINDOWS\SYSTEM\MSTASK.EXE
      266,293  C:\WINDOWS\SYSTEM\MSVCRT.DLL
      274,432  C:\WINDOWS\SYSTEM\MSVCRT20.DLL
       86,016  C:\WINDOWS\SYSTEM\MSWSOCK.DLL
       73,728  C:\WINDOWS\SYSTEM\MYDOCS.DLL
       24,064  C:\WINDOWS\SYSTEM\M_CTRL.DLL
      166,029  C:\WINDOWS\SYSTEM\NDIS.VXD
       23,744  C:\WINDOWS\SYSTEM\NDIS2SUP.VXD
       13,011  C:\WINDOWS\SYSTEM\NDISWAN.VXD
       20,480  C:\WINDOWS\SYSTEM\NETAPI32.DLL
       28,672  C:\WINDOWS\SYSTEM\NETBIOS.DLL
       14,448  C:\WINDOWS\SYSTEM\NETCPL.CPL
       20,480  C:\WINDOWS\SYSTEM\NTDLL.DLL
      790,528  C:\WINDOWS\SYSTEM\OLE32.DLL
      598,288  C:\WINDOWS\SYSTEM\OLEAUT32.DLL
       82,944  C:\WINDOWS\SYSTEM\OLECLI.DLL
      155,648  C:\WINDOWS\SYSTEM\OLEDLG.DLL
       24,064  C:\WINDOWS\SYSTEM\OLESVR.DLL
       23,102  C:\WINDOWS\SYSTEM\PARALINK.VXD
       47,104  C:\WINDOWS\SYSTEM\PASSWORD.CPL
       65,895  C:\WINDOWS\SYSTEM\PCI.VXD
       82,832  C:\WINDOWS\SYSTEM\PIFMGR.DLL
        1,920  C:\WINDOWS\SYSTEM\POWER.DRV
       51,984  C:\WINDOWS\SYSTEM\POWERCFG.CPL
       24,576  C:\WINDOWS\SYSTEM\POWRPROF.DLL
       20,334  C:\WINDOWS\SYSTEM\PTVCD.VXD
        5,672  C:\WINDOWS\SYSTEM\QUARTZ.VXD
      217,088  C:\WINDOWS\SYSTEM\RASAPI32.DLL
       61,440  C:\WINDOWS\SYSTEM\RNR20.DLL
      339,968  C:\WINDOWS\SYSTEM\RPCRT4.DLL
        9,802  C:\WINDOWS\SYSTEM\SAGE.VXD
       40,960  C:\WINDOWS\SYSTEM\SECUR32.DLL
       20,228  C:\WINDOWS\SYSTEM\SERENUM.VXD
       18,625  C:\WINDOWS\SYSTEM\SERIAL.VXD
       18,296  C:\WINDOWS\SYSTEM\SERWAVE.VXD
        6,208  C:\WINDOWS\SYSTEM\SETUP4.DLL
      409,600  C:\WINDOWS\SYSTEM\SETUPAPI.DLL
      745,168  C:\WINDOWS\SYSTEM\SETUPX.DLL
       61,440  C:\WINDOWS\SYSTEM\SHD401LC.DLL
      504,080  C:\WINDOWS\SYSTEM\SHDOC401.DLL
      356,352  C:\WINDOWS\SYSTEM\SHDOCLC.DLL
      946,448  C:\WINDOWS\SYSTEM\SHDOCVW.DLL
      126,704  C:\WINDOWS\SYSTEM\SHELL.DLL
    1,400,832  C:\WINDOWS\SYSTEM\SHELL32.DLL
       37,632  C:\WINDOWS\SYSTEM\SHFOLDER.DLL
      282,896  C:\WINDOWS\SYSTEM\SHLWAPI.DLL
       17,986  C:\WINDOWS\SYSTEM\SMARTVSD.VXD
       70,656  C:\WINDOWS\SYSTEM\STICPL.CPL
       32,768  C:\WINDOWS\SYSTEM\SVRAPI.DLL
       11,830  C:\WINDOWS\SYSTEM\SW3DPRO.VXD
       12,838  C:\WINDOWS\SYSTEM\SW3DPRO2.VXD
       11,832  C:\WINDOWS\SYSTEM\SWGAMPAD.VXD
      387,072  C:\WINDOWS\SYSTEM\SYSDM.CPL
        2,288  C:\WINDOWS\SYSTEM\SYSTEM.DRV
       16,400  C:\WINDOWS\SYSTEM\SYSTHUNK.DLL
       32,768  C:\WINDOWS\SYSTEM\SYSTRAY.EXE
       14,848  C:\WINDOWS\SYSTEM\TELEPHON.CPL
       37,376  C:\WINDOWS\SYSTEM\TIMEDATE.CPL
       12,112  C:\WINDOWS\SYSTEM\TOOLHELP.DLL
       34,676  C:\WINDOWS\SYSTEM\UNICODE.NLS
       59,539  C:\WINDOWS\SYSTEM\UNIMODEM.VXD
      446,736  C:\WINDOWS\SYSTEM\URLMON.DLL
      147,456  C:\WINDOWS\SYSTEM\USBUI.DLL
      549,664  C:\WINDOWS\SYSTEM\USER.EXE
       69,632  C:\WINDOWS\SYSTEM\USER32.DLL
       66,279  C:\WINDOWS\SYSTEM\VDHCP.386
       12,496  C:\WINDOWS\SYSTEM\VER.DLL
       24,576  C:\WINDOWS\SYSTEM\VERSION.DLL
        5,859  C:\WINDOWS\SYSTEM\VFD.VXD
        6,417  C:\WINDOWS\SYSTEM\VFIXD.VXD
       52,080  C:\WINDOWS\SYSTEM\VGA.DRV
       14,624  C:\WINDOWS\SYSTEM\VGAFULL.3GR
       25,106  C:\WINDOWS\SYSTEM\VGARTD.VXD
       80,385  C:\WINDOWS\SYSTEM\VIP.386
       35,872  C:\WINDOWS\SYSTEM\VJOYD.VXD
      928,319  C:\WINDOWS\SYSTEM\VMM32.VXD
       90,869  C:\WINDOWS\SYSTEM\VNBT.386
       39,506  C:\WINDOWS\SYSTEM\VNETBIOS.VXD
       17,631  C:\WINDOWS\SYSTEM\VNETSUP.VXD
       37,523  C:\WINDOWS\SYSTEM\VPOWERD.VXD
      165,437  C:\WINDOWS\SYSTEM\VREDIR.VXD
      101,617  C:\WINDOWS\SYSTEM\VRTWD.386
      112,888  C:\WINDOWS\SYSTEM\VSERVER.VXD
       60,257  C:\WINDOWS\SYSTEM\VTCP.386
        5,691  C:\WINDOWS\SYSTEM\VTDI.386
       20,653  C:\WINDOWS\SYSTEM\VUDP.386
        5,186  C:\WINDOWS\SYSTEM\WDMMDMLD.VXD
      274,704  C:\WINDOWS\SYSTEM\WEBCHECK.DLL
      459,024  C:\WINDOWS\SYSTEM\WININET.DLL
       65,536  C:\WINDOWS\SYSTEM\WINMM.DLL
       62,224  C:\WINDOWS\SYSTEM\WINOA386.MOD
       23,040  C:\WINDOWS\SYSTEM\WINSPOOL.DRV
       49,152  C:\WINDOWS\SYSTEM\WMI.DLL
       57,344  C:\WINDOWS\SYSTEM\WMICORE.DLL
       16,384  C:\WINDOWS\SYSTEM\WMIEXE.EXE
       24,576  C:\WINDOWS\SYSTEM\WS2HELP.DLL
       73,728  C:\WINDOWS\SYSTEM\WS2_32.DLL
        9,917  C:\WINDOWS\SYSTEM\WSHTCP.VXD
       15,527  C:\WINDOWS\SYSTEM\WSOCK.VXD
       23,183  C:\WINDOWS\SYSTEM\WSOCK2.VXD
       40,960  C:\WINDOWS\SYSTEM\WSOCK32.DLL

      185,902  C:\WINDOWS\SYSTEM\VMM32\IFSMGR.VXD
       69,570  C:\WINDOWS\SYSTEM\VMM32\IOS.VXD
        9,792  C:\WINDOWS\SYSTEM\VMM32\QEMMFIX.VXD

       59,184  C:\WINDOWS\SYSTEM\IOSUBSYS\AIC78XX.MPD
       29,497  C:\WINDOWS\SYSTEM\IOSUBSYS\APIX.VXD
       11,311  C:\WINDOWS\SYSTEM\IOSUBSYS\ATAPCHNG.VXD
        9,952  C:\WINDOWS\SYSTEM\IOSUBSYS\BIGMEM.DRV
       59,133  C:\WINDOWS\SYSTEM\IOSUBSYS\CDFS.VXD
       13,884  C:\WINDOWS\SYSTEM\IOSUBSYS\CDTSD.VXD
       32,419  C:\WINDOWS\SYSTEM\IOSUBSYS\CDVSD.VXD
       18,809  C:\WINDOWS\SYSTEM\IOSUBSYS\DISKTSD.VXD
       10,194  C:\WINDOWS\SYSTEM\IOSUBSYS\DISKVSD.VXD
       24,406  C:\WINDOWS\SYSTEM\IOSUBSYS\ESDI_506.PDR
       25,741  C:\WINDOWS\SYSTEM\IOSUBSYS\HSFLOP.PDR
        9,926  C:\WINDOWS\SYSTEM\IOSUBSYS\NECATAPI.VXD
       13,242  C:\WINDOWS\SYSTEM\IOSUBSYS\RMM.PDR
       19,270  C:\WINDOWS\SYSTEM\IOSUBSYS\SCSI1HLP.VXD
       23,650  C:\WINDOWS\SYSTEM\IOSUBSYS\SCSIPORT.PDR
       11,067  C:\WINDOWS\SYSTEM\IOSUBSYS\TORISAN3.VXD
       18,491  C:\WINDOWS\SYSTEM\IOSUBSYS\VOLTRACK.VXD

       31,680  C:\WINDOWS\SYSTEM32\DRIVERS\CCPORT.SYS
       23,520  C:\WINDOWS\SYSTEM32\DRIVERS\HIDCLASS.SYS
       44,368  C:\WINDOWS\SYSTEM32\DRIVERS\HIDPARSE.SYS
        5,088  C:\WINDOWS\SYSTEM32\DRIVERS\HIDVKD.SYS
      137,120  C:\WINDOWS\SYSTEM32\DRIVERS\KMIXER.SYS
       98,432  C:\WINDOWS\SYSTEM32\DRIVERS\KS.SYS
      165,424  C:\WINDOWS\SYSTEM32\DRIVERS\PORTCLS.SYS
        5,664  C:\WINDOWS\SYSTEM32\DRIVERS\REDBOOK.SYS
       36,112  C:\WINDOWS\SYSTEM32\DRIVERS\SBEMUL.SYS
       39,776  C:\WINDOWS\SYSTEM32\DRIVERS\STREAM.SYS
        3,296  C:\WINDOWS\SYSTEM32\DRIVERS\SWENUM.SYS
       52,656  C:\WINDOWS\SYSTEM32\DRIVERS\SWMIDI.SYS
       45,456  C:\WINDOWS\SYSTEM32\DRIVERS\SYSAUDIO.SYS
       30,448  C:\WINDOWS\SYSTEM32\DRIVERS\UHCD.SYS
       60,592  C:\WINDOWS\SYSTEM32\DRIVERS\UPDATE.SYS
       40,272  C:\WINDOWS\SYSTEM32\DRIVERS\USBAUDIO.SYS
       18,912  C:\WINDOWS\SYSTEM32\DRIVERS\USBD.SYS
       35,680  C:\WINDOWS\SYSTEM32\DRIVERS\USBHUB.SYS
       68,096  C:\WINDOWS\SYSTEM32\DRIVERS\WDMAUD.SYS
        4,064  C:\WINDOWS\SYSTEM32\DRIVERS\WDMFS.SYS
       14,800  C:\WINDOWS\SYSTEM32\DRIVERS\WMIDRV.SYS
        3,600  C:\WINDOWS\SYSTEM32\DRIVERS\WMILIB.SYS

          967  C:\WINDOWS\DESKTOP\CONSOLE.PIF

          303  C:\WINDOWS\START MENU\PROGRAMS\WINDOWS EXPLORER.LNK
          278  C:\WINDOWS\START MENU\PROGRAMS\ACCESSORIES\NOTEPAD.LNK
          278  C:\WINDOWS\START MENU\PROGRAMS\ACCESSORIES\SYSTEM TOOLS\DISK DEFRAGMENTER.LNK
          284  C:\WINDOWS\START MENU\PROGRAMS\ACCESSORIES\SYSTEM TOOLS\SCANDISK.LNK
          380  C:\WINDOWS\START MENU\PROGRAMS\ACCESSORIES\SYSTEM TOOLS\SCHEDULED TASKS.LNK

   ----------  For the video card that I have (Matrox) ------------------

      221,312  C:\WINDOWS\SYSTEM\MGAPDX64.DRV
       79,158  C:\WINDOWS\SYSTEM\MGAPDX64.VXD

        >>>>>  My system crashes at the boot time without these files
               unless VGA.DRV is present.

   ----------  For the sound card that I have (CMI) ---------------------

       79,872  C:\WINDOWS\SYSTEM\CMMPU.EXE

        >>>>>  My system complains that this file is missing (not fatal).

   ----------  For the Ethernet adapter that I have ---------------------

       29,820  C:\WINDOWS\SYSTEM\RTL8139.SYS

   ----------  For USB-disk support -------------------------------------

      200,704  C:\WINDOWS\TPPSTRAY.EXE
      118,784  C:\WINDOWS\TPPALDR.EXE
       33,669  C:\WINDOWS\SYSTEM32\DRIVERS\TPP300.SYS
        8,650  C:\WINDOWS\SYSTEM32\DRIVERS\TPPIOSMP.SYS
        4,692  C:\WINDOWS\SYSTEM\IOSUBSYS\TPPIOSTB.PDR

  

© Copyright 2003 Pixelab, Inc. All rights reserved.

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


XXCOPY
[ Back to Table of Contents ]

XXCOPY TECHNICAL BULLETIN #90



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: XXCOPY Corporate Site License
Date:    2001-06-12
====================================================================


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
     X X C O P Y   F r e e w a r e   L i c e n s e   T e r m s
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Pixelab, Inc, the copyright owner of the XXCOPY software package,
grants a non-exclusive license without charge to you, an individual
who intends to use the XXCOPY program for non-commercial purposes
provided that all of the following additional conditions are met.

You may use XXCOPY under this freeware license if:

 1.  You install the XXCOPY program on a computer that is your own
     personal property and you are the primary user of the computer.

 2.  If you transfer files between networked computers using XXCOPY,
     all of the computers are also your own personal property.

 3.  Or, even if the above conditions are not met, you may still use
     XXCOPY for 60 days for evaluation purposes without charge.


If your situation does not qualify for the freeware license,
the usage of XXCOPY will be considered as a commercial usage.
Please contact Pixelab that offers various types of licenses.

This freeware version of XXCOPY is distributed AS IS and without
any warranties.  If you have problems, our liability is limited
to $1.00 per site, that is much more than you paid for it.

XXCOPY is a trademark of Pixelab, Inc.

With the freeware license, you may give your friends a copy of the
XXCOPY Freeware, as long as the package is not altered and remains
as a whole.  However, for distribution on a commercial basis,
(even in a Freeware distribution CD-ROM, or download service),
you must obtain a written permission from Pixelab, Inc.

Please note that Emails from freeware users may not be answered due
to the large number of Emails we receive.  If you wish to receive
technical support by Email, you may consider acquiring a single user
license even if your usage complies with the freeware license terms.




* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
   X X C O P Y   C o m m e r c i a l   U s e   L i c e n s e   T e r m s
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Pixelab, Inc, the copyright owner of the XXCOPY software package,
grants a non-exclusive license to you, the holder of the commercial use
license to use the XXCOPY program for personal and/or commercial purposes.

Under the commercial use license, you are allowed to access files on a
number of remote (networked) computers.  The license sets a limit on the
number of computers that you are permitted to access using the XXCOPY
software unless specifically stipulated as UNLIMITED.

If the number of computers that you routinely access files using XXCOPY
exceeds the limit of the current license, you should upgrade to a license
with a larger limit.

This version of XXCOPY is distributed AS IS and without any warranties
except that it will perform substantially as documented.  It is not
perfect and you should subscribe to our update plan to get both bug fixes
and corrections. If you have problems, our liability is limited to
refunding the amount that you paid for the license less the fair value
of your use. 

Please note that the software is protected by the copyright laws and
international treaties.  You are authorized to make two copies for
backup purposes.  You may not transfer or disclose the software package
to a third party.

XXCOPY is a trademark of Pixelab, Inc

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



             *************************************
              Commercial Use Site License Pricing
             *************************************

        License     The number   Per-computer    Total    
        Package    of Computers     Price     License Fee 
       ---------------------------------------------------
        XXLIC           2-9          $20       $40 - $180 
        XXLIC-010        10          $18         $   180  
        XXLIC-020        20          $16         $   320  
        XXLIC-050        50          $12         $   600  
        XXLIC-100       100          $ 9         $   900  
        XXLIC-200       200          $ 6         $ 1,200  
          ...                                       ...   
          ...      can go as low as  $ 1            ...   


For a networked environment, please contact Pixelab for a quotation
with a special discount pricing.


License
 Click this button to go to the Ordering page
 for the XXCOPY Corporate Site License...



Once the XXCOPY program is installed in accordance with the site
license terms, the program will function indefinitely.

Being a licensee, your Emails with questions will be given higher
priority for tech support.  We may not reply to Emails from freeware
users when our tech support technicians are busy.

A site license allows you to download free updates within twelve
months of the license date.  For a renewal of a site license for
updates beyond the first twelve months, please contact Pixelab.

For on-line ordering of Corporate Site Licensing, please visit
the following web site: xxform46.htm  XXCOPY Order form.
For an order with $300 or more, we accept a Purchase Order.
Please send Email to <sales@xxcopy.com.


© Copyright 2003 Pixelab, Inc. All rights reserved.

[ XXCOPY Home ] [ Table of Contents ]


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

XXCOPY TECHNICAL BULLETIN #99



From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: Revision History of XXCOPY.
Date:    2004-02-21  (latest update)
====================================================================


 Version   Date

 2.20.0   1999-10-01    XXCOPY debuted under the new name.
 2.21.9   2000-01-07    the limit on # of exclude-items removed
 2.22.0   2000-01-14    /X and /EX made better
 2.22.2   2000-01-14    New switch, /DA#n (relative # days from today)
 2.22.8   2000-02-11    New switch, /CC and /CCY (auto-exclude on cyclic copy)
 2.22.9   2000-02-16    New switch, /AA /AZ
 2.24.3   2000-03-13    /K and /KS now work with directory attributes.
 2.25.1   2000-05-07    /CLONE, a shortcut for /KS/H/E/R/Q/Y/BI/ZY
                        New switches /RC/RS/RD/RX, for file removal.
 2.40.0   2000-06-18    /FT allows file-time comparison in mixed OS
 2.42.2   2000-10-13    XXCOPY16 now works /XFT allows file-time comparison in mixed OS
                        XXCOPY16 supports all XXCOPY (32-bit) features
                        New /SG feature, gathers files into one directory
                        Partial date parameter accepted  (/DA:2000-05)
                        New /AT, /AX, /AN, /AS, /AR switches
                        /N made XCOPY-compatible (old /N renamed to /NX)
                        /BZ checks the file size but not file time.
                        New /NP for precise filename matching algorithm
                        New /CB for cleaner batch files
 2.42.4   2000-11-11    bugfix on XXCOPY16 /DA and /DB parameters
 2.42.5   2000-11-17    bugfix on /RX operation
 2.44.0   2001-01-15    New switches /SP, /DL, /NI
                        Enhanced     /X and the source specifier syntax
 2.44.1   2001-01-19    bugfix /NI parsing was incorrect
 2.44.2   2001-01-23    bugfix nested Wild-Wild-source dir with /X items
 2.44.3   2001-01-28    improved, \src\*\a\b\ matches a case like \src\a\a\b\
 2.44.4   2001-01-31    New /WD warning switch
 2.60.0   2001-07-04    New release with all the new features that were
                        tested between v.2.54.6 and v.2.56.9

 2.80.0   2001-12-31    New release with features up to v.2.71.5
 2.80.0   2002-01-01    The newe version for the new year (put a new date).
 2.80.1   2002-01-01    Bugfix XXCOPY16's timestamp (problem started v2.71.0)
 2.80.2   2002-01-06    Bugfix destination directory timestamp on NT/2K/XP.
 2.80.3   2002-01-06    Minor bugfixes.
 2.80.6   2002-04-17    Context-sensitive help for Prompt buster (? on Y/N)
                        Command Switch may accept a colon as a delimiter
                        Bugfix /DBxxH, /DBxxM, /DBxxS.
                        Bugfix WinNT/2K/XP overwriting RHS files.
                        New macro variables, /$WWW$ /$W$ /$HOST$
                        Improved switches /IA:, /IP:
                        Improved switches /WS, /WE
 2.82.0   2002-06-28    New release based on beta v.2.90.9
 2.82.2   2002-07-01    Bugfix /INSTALL sequence         
 2.82.3   2002-08-01    Supports Windows 2000 SP3.
 2.82.4   2002-09-13    Supports Windows XP   SP1.
 2.82.6   2002-09-21    Bugfix /R (for removing rd-only directory)
                        Bugfix /E (in 2.82.4 it had problems)
 2.82.7   2002-10-25    Bugfix batch launch on XP with quoted string on 1st wd
 2.82.8   2003-01-28    Bugfix /SG/SX (was broken since 2.80.0)
                        Bugfix copying large files (>= 4GB)
                        Bugfix /PB
                        Improved checking on directory specifier arguments.
 2.82.9   2003-02-10    Improved /NX (SFN-preservation) function
 2.82.9b  2003-02-26    Bugfix /TR (formerly known as /SZ).
 2.84.4   2003-05-28    New switches /ILS /ILD /CA
                        New macros /$M$ /$D$ /$H$ /$N$ /$S$ /$IIII$ /$IWK$ /$K$
 2.84.6   2003-07-01    Supports Windows 2000 SP4.
 2.84.7   2003-07-09    /RC can be combined with /SX,/SL, or /SR.
                        Supports Windows NT4  SP4.
 2.84.8   2003-07-10    Warning with /FF case for a /BI operation
 2.84.9   2003-07-11    Bugfix /Xc:\pagefile.sys
 2.85.0   2003-08-11    Bugfix /RC/R (/R is for both overwrite and delete) 
 2.85.1   2003-08-16    Bugfix /ILD now works
 2.85.2   2003-12-03    Bugfix /PB: now handles the threshold right.
 2.85.3   2003-12-19    Bugfix /RC/PB combination had extra dir display.
 2.85.4   2004-02-21    /WV warning with detail report.
 2.85.5   2004-04-16    Release for 2004-04-13 MS security release
 2.85.6   2004-05-16    Bugfix /H/A did not process hidden directories
 2.85.7   2004-05-16    Bugfix /H/A did not process hidden directories
 2.85.6   2004-05-16    Bugfix /H/A did not process hidden directories
 2.85.7   2004-07-27    /WV0 no longer needed with new timed-message prompt.
 2.85.8   2004-08-14    Supports Win XP Service Pack 2
 2.85.9   2004-09-09    Improved monitoring of network connection status
 2.85.9b  2004-09-11    Treates remote volume mapped driveletter as remote. 
 2.85.9c  2005-01-13    Freeware update for Microsoft's security patch release
 2.85.9d  2005-01-28    Exit code labeling (> 100), /Bo/BN/? help text fixed

 *** beta releases      **********************************************

 2.35.2   2000-05-08    bugfix /z which failed on RdDir on WinNT/2K
                        bugfix UNC path on remote directory now works well
 2.35.8   2000-06-05    bugfix /DB:.  /D valid date between 1970-2069
 2.50.7   2000-08-15    XXCOPY16 supports all XXCOPY (32-bit) features
 2.50.9   2000-08-27    New /SG feature, gathers files into one directory
 2.51.0   2000-09-01    Bugfix /Fo fatal crash at the end (no real damage)
 2.51.1   2000-09-09    Partial date parameter accepted  (/DA:2000-05)
 2.51.2   2000-09-13    Bugfix /R was not working since v2.25.1
 2.51.3   2000-09-15    New /AT, /AX, /AN, /AS, /AR switches
 2.51.4   2000-09-18    /N made XCOPY-compatible (old /N renamed to /NX)
 2.51.5   2000-09-19    /BZ checks the file size but not file time.
 2.51.6   2000-09-22    Bugfix on UNC pathname under NT4
                        New /NP for precise filename matching algorithm
 2.51.7   2000-09-25    Bugfix on file display with /Rx (remove command)
 2.51.9   2000-10-03    New /CB for cleaner batch files
 2.52.0   2000-10-09    Enhanced exclusion specifier with multi-level dir
 2.52.3   2000-10-31    New /CR for retry timeout set
                        New /SP for span destination into multi volume
                        New /BZX/BZL/BZS/BZE more variations in backup
 2.52.6   2000-11-30    New /SP (span media) /IN (include alt template)
                        New Wild-Wild-Source, the enhanced source specifier
                        with multi-level wildcard directory and template
 2.52.9   2000-12-08    Bugfix /X directory/template matching
 2.53.0   2000-12-09    New /DL to limit the directory nesting levels
 2.53.2   2000-12-24    Bugfix XXCOPY16's source specifier with trailing BS
 2.53.3   2000-12-29    Macros (/$xxxx$) to embed date/time in parameters
 2.53.5   2001-01-04    Bugfix /L statistics, /X*\*\dir\
 2.53.6   2001-01-15    As the official release version v2.44.0
 2.54.6   2001-02-12    Bugfix /INxxxx for XXCOPY16
                        New  /NW /ND for Wildcard treatment selection
 2.54.7   2001-02-13    New  /FR for Rounding Up filetime (NTFS).
 2.54.9   2001-02-14    Bugfix The name matching scheme had some holes.
 2.55.0   2001-02-24    New /DA#nH, /DA#nM, to specify age by hr, min, etc.
 2.55.1   2001-02-26    New /PB to show the progress bar
			New /TS /TD for timezone adjustment
 2.55.2   2001-02-27    Bugfix /RS/RC/RD/RX prompt/display corrected
 2.55.3   2001-03-01    Bugfix /X when base directory is at the root
 2.55.4   2001-03-03    Bugfix XXCOPY16 /X with UNC
 2.55.5   2001-03-04    Bugfix /X with absolute pathspec
 2.55.6   2001-03-18    New /CF which accepts a command file
 2.55.7   2001-03-20    Bugfix /X some more rare case
 2.55.8   2001-03-23    Aggressive file access for shared file backup
 2.56.0   2001-06-10    Two versions: XXCOPY-PRO and XXCOPY-FREEWARE 
 2.56.1   2001-06-12    Bugfix /NW on XXCOPY16
 2.56.2   2001-06-14    Bugfix /Xabc\*\ and /Xabc\?\ cases added 
 2.56.3   2001-06-15    Bugfix /X\mydir (on where srcdir is not default drive)
 2.56.4   2001-06-20    Bugfix /oF and XXCOPY16's /NW on /X paramters
 2.56.5   2001-06-22    Mew    /FF fpr Fuzzy Filetime with flexible parameters
 2.56.6   2001-06-23    Buxfix /H /Ho (bug introduced in v2.55.1)
 2.56.7   2001-06-29    New /LTREE switch to list directories only
 2.56.8   2001-07-01    Improved /PB display using a new pop-up window
 2.56.9   2001-07-03    Bugfix /CK0 (which was malfunctioning since v2559)
                        Bugfix /CE exit code propagation back in operation
                        Bugfix /LDT now shows the /FC and /FA option
                        New  NUL recognized as nonmatch-file pattern
 2.57.0   2001-07-04    Bugfix /DB#x,  the midnight-based time-comparison
                        was inadvertently in effect even for a non-day value.
 2.70.1   2001-07-10    New  /INSTALL: to specify XXCOPY's home dir
 2.70.2   2001-07-20    /PB is removed from the default in /CLONE
                        The progress bar no longer takes away the input focus.
                        Bugfix on UNC-based destination specifier (root) which
                        results in a fatal error.
                        /WV and /WV0 for system DLL timestamp test and warning. 
 2.70.3   2001-08-05    Bugfix /AZ displayed an erroneous file count in stats
 2.70.4   2001-09-01    Bugfix access to 1st level dir \\server\rsrc\ on NT/2K
 2.70.5   2001-09-04    Bugfix SFN preservation on dir names sometimes failed.
 2.70.6   2001-09-10    New /SC /SF features for security info handling.
 2.70.7   2001-09-26    Enhanced /DA: and /DB: with time value
                        Bugfix /X on WinNT/2K for root-level exclusion dir.
 2.70.8   2001-10-04    Improved /HELP with built-in "More" funcition 
			Improved /SC/SF now works under Win98/ME
			Bugfix NT/2K registry key retireval (/CB works better)
			Improved pathname parser (GetFullPathName())
 2.71.0   2001-10-09    Last-Access timestamp /TTA0 as default (like Robocopy)
 2.71.1   2001-10-11    Bugfix /TTA0 warning suppressed when harmless
 2.71.2   2001-10-20    Improved /DA/DB with partial date specifiers
                        Bugfix /V2 with open files
			Improved Elapsed time displayed
 2.71.4   2001-10-23    Bugfix /RC now handle creation of subdirectories
                        Now /ED preserves N levels of empty directories.
 2.90.3   2002-01-09    Minor bugfixes.
 2.90.8   2002-06-13    No default file pattern unless /IN is defined
                        New /TFxx/TTxx/TCxx (to be documented later)
                        New /DA@ to accept timestamp of a file as time value
 2.90.9   2002-06-19    Bugfix of error on directory timestamp setting




Note:  the second digit in version number denotes a beta test version
       if it is an odd value.  For example, Ver 2.34.6 is a beta test
       version which is equivalent of release version ver2.24.6.




© Copyright 2003 Pixelab, Inc. All rights reserved.

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

© Copyright 2003 Pixelab, Inc. All rights reserved.