home *** CD-ROM | disk | FTP | other *** search
-
- -----------------------------------------------------------------
- CB version 2.03
- ~~~~~~~~~~~~~~~
- Copyright (C) 1988 F.M. de Monasterio. All rights reserved
- For personal, non-commercial use only. Cannot be sold.
- -----------------------------------------------------------------
-
- A Copy and Backup utility
-
-
- Purpose CB is a fast copy utility that accepts the wildcards
- ~~~~~~~ '*' and '?' Unlike the copy command of DOS, CB does
- not allow for changing the name of the copied file.
-
- The most powerful property of CB.COM is that it will
- only copy a file (1) for which another with the same
- name does not already exist in the target or (2), if
- it does, its time and date stamp is older than that
- -- of the source file, or -if requested by the user- (3)
- -- the archive bit of the source file is on (indicating
- that this file was opened [irrespective of whether a
- modification actually took place]).
-
- Hence, CB is a good substitute for DOS' commands COPY
- and BACKUP, with the advantage that one does not have
- to RESTORE the backup files, and that CB warns if the
- target disk is full.
-
- --------------------------------------------------------------------------------
-
- Input Arguments in the command line:
- ~~~~~
- ⌐--- copy ---¬ ⌐-- to --¬
- CB [d:\path\]File [d:\]Path\ [/switch(es)]
-
- Valid switches are:
-
- -- /A = force copy of source file(s) with Archive bit on,
- -- within the updating criteria determined by other
- -- switches (especially /D). In the absence of any
- -- switch, CB defaults to copy new and more recent
- -- source files. (The archive bit on indicates the
- file was at least opened and possibly modified.)
-
- /B = cancel the default reset of the archive Bit. Use
- this switch if you intend to use another backup
- utility, or to make a further backups to another
- target.
-
- /D = select only source file(s) for which a Duplicate
- exists in the target path. Use to avoid backup
- of new source files to a target that contains the
- duplicates.
-
- /E = cancel the default Echo to screen of the file(s)
- being copied. Do not use redirection to the NUL
- device (bit bucket) as this results in no copy.
-
- /M = Move the source file to target path. This switch
- results in the deletion of the source file after
- -- a successful copy to the target. If an actual copy
- -- was NOT made the source file is NOT erased, even
- -- if a duplicate (target) file already exists which
- -- satisfies the selected update criteria.
-
- -- /N = select only New source file(s), i.e. non-duplicate
- -- ones. Use to avoid backup of duplicate files. /N
- -- and /D switches are incompatible.
-
- /R = reject copy to Read only target. CB defaults to
- copy to a duplicate target file with or without a
- Read-Only attribute. Use this switch to protect
- RO duplicate target files.
-
- /T = select Today's date file(s) only. CB will backup
- only those source files whose date stamp matches
- the current date provided by DOS to CB (this may
- not be necessarily the correct date for the day).
-
- -- Some combinations of these switches are incompatible or
- -- conflicting. To the extent possible, CB honors switches
- -- following the rank: T > N > D > A
-
- Wilcards '*' and '?' are accepted in the source's name
- and are expanded according to DOS rules.
-
- Note that NAME.EXT is not to be provided for the target
- copy since the source's name is preserved. There is no
- provision for a verify switch (/v) because DOS's verify
- does not verify the copied data, but only that the disk
- can be read.
-
- Also notice that CB will copy source files whose path is
- indicated or, if a path has not been specified, files of
- the current directory. Source files of subordinate level
- subdirectories are NOT copied to the target path.
-
- -- Although CB checks for obvious attempts of copying a file
- -- to itself, it is possible to defeat these checks and ruin
- -- the file, especially when the /A switch is specified. It
- -- is YOUR responsibility to avoid such erroneous commands.
-
- --------------------------------------------------------------------------------
-
- Output The selected file (or files if using wild cards) are
- ~~~~~~ written to the selected target path depending on their
- properties (new, more recent, and/or modified) and the
- selected combination of switches.
-
-
- The help screen below is diplayed by invoking CB with
- a null argument or a '?':
-
-
- ┌─┘ SYNTAX └───────────────────────────────┐
- │ ⌐--- copy ---¬ ⌐-- to --¬ │
- │CB [d:\path\]File [d:\]Path\ [/switch(es)]│
- │ /A = force Archive+ source file copy │
- │ /B = cancel default archive Bit reset │
- │ /D = select Duplicate file only │
- │ /E = cancel default Echo to screen │
- │ /M = Move source file to target path │
- │ /N = select New source file only │
- │ /R = reject copy to Read only target │
- │ /T = select Today's date file only │
- └───────────────────────────── Press a key ┘
-
-
- Messages CB will prompt the user to alternative action if a DOS'
- ~~~~~~~~ critical (disk) error is detected: disk write protected,
- diskette bay door open, missing diskette, etc; or if the
- -- target disk(ette) is full. In addition to these sources
- -- of disk error messages, other unexpected sources include
- -- the following:
-
- -- 1) The /B switch was not used and the *source* drive is
- -- write-protected: the write-protect error message will
- -- be displayed because CB attempts to reset the archive
- -- bit of the source file.
- -- Solution:
- -- Remove the write protection or use the /B switch.
-
- -- 2) If a diskette drive door is opened when copying files
- -- (e.g. CB *.* d:), several messages will be displayed:
- -- first indicating a Disk error 'drive door opened' and
- -- then (erroneously) that the target disk is full.
- -- Solution:
- -- Press ENTER during the 'disk-full' message and copying
- -- will resume at the point it was interupted.
-
- --------------------------------------------------------------------------------
-
- Display The program has been tested in both EGA and Mono displays
- ~~~~~~~ with no obvious problem. For displaying the windows, test
- for display type is made via interrupt 11h. Text under the
- window will NOT be restored in graphics mode. The display
- colors can be changed with DEBUG in locations 02C1 to 02C4:
-
- xxxx:02C0 FF 0E 31 1B 1B 00 00 00-00 00 00 00 00 00 00 00
- ~~ ~~ ~~ ~~
- where 02C1 is the color of non-window messages, 02C2 that of
- the critical-error-handler window, 02C3 that of the syntax
- window, and 02C4 that of the full-disk window.
-
- --------------------------------------------------------------------------------
-
- Remarks Tested in an IBM-AT with an Inboard 386/AT running at a
- ~~~~~~~ Norton SI index of 16.2, and a Landmark test AT "speed"
- of 24 Mhz, operating under DOS 3.1x or 3.2x, and an IBM
- XT running at 4.77 Mhz.
-
- Release Both CB.COM and its documentation are copyrighted, and
- ~~~~~~~ distributed free of charge for personal, non-commercial
- use only. The author makes no warranty, either implied
- or expressed, including without limitation any warran-
- ties with respect to the software documented here, its
- quality, performance or fitness for any particular pur-
- pose. The entire risk as to the quality and performance
- of the software is with the user. In no event will the
- author be liable for any damages, whether direct, indi-
- rect, special, incidental or consequential arising from
- the use of or any defect in the software. By using the
- program you acknowledge (1) to have read and understood
- all parts of the disclaimer and (2) to have agreed with
- and accepted each and all of its provisions.
-
- --------------------------------------------------------------------------------
-
- Packing CB.ARC contains the following files with the noted CRC
- ~~~~~~~ hexadecimal values:
-
- CB????h DOC 12290 7-18-88 2:03 CRC: see name
- CB COM 6032 7-18-88 2:03 CRC: 03E6h
-
- The DOC file contains 12290 characters in 1485 words and
- 228 lines; its CRC is shown by the 4 digits in the ARCed
- DOC file.
-
-
- --------------------------------------------------------------------------------
-
- History Versions 1.00 thru 1.6 were written between 20 Jan 1988
- ~~~~~~~ and 15 June 1988 and beta-tested in situ.
-
- Ver 2.00 11 July 1988 -- circulated in local BBS.
-
- Ver 2.01 13 July 1988 -- Forced CB to check for BREAK request before
- reseting source's archive bit or before deleting the source
- file on a move request. Cleaned up some code.
-
- Ver 2.02 15 July 1988 -- Number of bytes left in disk are shown in
- the 'full-disk' window. The disk letter is now identified
- in the 'full-disk' string on the screen. Rearranged code
- location and added some additional subroutines.
-
- Ver 2.03 18 July 1988 -- Added /N switch to select new files only,
- and changed /A switch to force the (now) non-default copy
- of source files with the archive bit on. Added test for
- fixed vs. removable medium, and changed the full-disk msg
- to give option to new disk for removable media only. Added
- more controls to check for self-copy requests, and modified
- location of window colors to allow for easier debugging by
- user.
-
- --------------------------------------------------------------------------------
- F.M. de Monasterio -- phone: 301-496-4269 after 5 pm EST