home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug144.arc
/
COPY131.LBR
/
COPY.DZC
/
COPY.DOC
Wrap
Text File
|
1979-12-31
|
15KB
|
346 lines
DOCUMENTATION FOR COPY.COM
==========================
March 1988
COPY (or CP) is simply a utility to copy files, but it has many features which
make it outstandingly useful and versatile. It is an upgrade of that old
workhorse of a file copier, ZIP.COM, which has been around for many years.
COPY is limited to use on a Z80 based computer running CP/M 2.2, 3.n, or ZCPR.
What a pity there's nothing as easily powerful in the MS-DOS world!
COPY version 1.3n introduced two new features, the ability to continue after a
`DISK FULL' is encountered and an option to copy un-archived files.
COPY is a `buffered' file copier, ie, it uses all available TPA for buffering
file read and writes. It reads as much as it can into memory before switching
drives to write the files. In this respect it differs from most other files
copiers, eg, PIP, SWEEP, etc, which read and write one file at a time. This
makes it much, much faster.
COPY has command-line and interactive modes. Command-line mode means you enter
the file information after the command "COPY", and return to the system when
the copying is complete. Interactive mode means that you stay in the copy
utility until you decide to exit. To enter interactive mode, just type COPY<CR>
in response to the operating system prompt. When finished, pressing just <CR>
at the COPY prompt will exit to the system again.
COPY provides comprehensive advice on just what it's up to and, when finished,
tells you how many files were copied, and whether they were verified.
Brief on-line help is obtainable by entering a single character after the verb,
e.g. COPY ? (or by making a mistake in the command line).
-----------------------------------------------------------------------
COPY's features may be broadly divided into two main categories:
1. Different methods of defining on the command line, what file(s) is(are) to
be copied. This is syntax related.
2. Different options which may be invoked for the copying procedure, ie, the
'dash' options. The dash options are
-a (A)rchive. Copy non-archived files only
-d (D)isk change (single drive copy)
-n re(N)ame file while copying
-r (R)elog disk
-v (V)erify after copying
-----------------------------------------------------------------------
COMMAND LINE SYNTAX
===================
Please note especially that the `normal' CP/M (ridiculous) back-to-front syntax
for source and destination does NOT apply. The syntax for COPY is that the
source comes before the destination so that when typing the command, you are
saying: "Please ...
copy FROM the source, the files I want, TO the Destination .... thankyou."
---- --
The actual form for the command line syntax for COPY is,
COPY [-o] [S[u]:]afile1 .. [S[u]:]afile10 [D[#]:]
If this seems daunting, please see the various examples offered below.
For COPY's interactive mode (see near the end of these docs), the syntax for
the commands is the same, except that you do not need to type "COPY" for each
separate command line.
COPY>[-o] [S[u]:afile1 .. [S[uu]:afile10 [D[#]:]
where
`o' is one or more of the dash options,
`S' is source drive letter, `u' is source user number,
`afile' is an ambiguous file name, ie, name can contain `?' or `*'
`D' is destination drive letter, `#' is destination user number.
In the above general command form, anything enclosed in square brackets [] is
optional.
`S' and `u' may be different for each file in the list. `u' may be *, which
allows files from any user area to be found for copying. eg, A*: will find a
file in user 15 on drive A:. You therefore don't need to remember where all the
files may be located.
`#' may not be *, which is pretty obvious really. You don't want to copy the
same files to every user area on the destination disk.
If any file in the list doesn't have an associated drive or user, or no
destination drive/user is provided, then current defaults are assumed for
these.
A space delimits all parameters, ie, dash options, drive designators, file
names.
The colon character `:' always defines the preceding alphanumeric characters as
a location, and this applies to both the source and destination. A letter
implies a drive; a number implies a user number. For example,
A: <-- is drive A
2: <-- is user 2 on current drive
B2: <-- is user 2 on drive B
C15: <-- is user 15 on drive C
-----------------------------
You MUST specify either the source OR destination OR both and they must be
different (with one exception - see below). For example, assuming you are
logged onto A0:, i.e., user 0 on drive A,
A:COPY fred.com <-- is invalid because no different destination is
specified.
A:COPY b:fred.com a: <-- is valid because the location of the source file is
different to the destination drive.
A:COPY b:fred.com <-- is valid because the location of the source file is
different to the logged drive
A:COPY a:fred.com <-- is invalid because the location of the destination
drive (logged drive) is not different to the source.
A:COPY fred.com 1: <-- is valid because the destination is to a different
user area.
A:COPY 1:fred.com <-- is valid because the source is different to the
logged drive.
Exception: If you are copying to another disk in the same drive, the source and
destination may be the same. To avoid COPY from seeing it as a syntax error and
to ensure that you really do want to copy to another disk, you must use the
dash option, -d. For example,
A:COPY -d fred.com <-- is valid because you have invoked the single drive
option. This will copy FRED.COM to another disk in
drive A:. COPY will prompt you when to change disks.
-----------------------------
A file name without an extent should be entered as `FRED.' surrounded by
delimiting spaces. Note the period. For example,
A:COPY bios.com fred. nurk.doc b:
-----------------------------
The placement (order) of the various components on the command line is
important. For example the dash options must be in the first field on the
command line.
A:COPY -n fred.com b:frednew.com <-- is valid.
A:COPY fred.com -n b:frednew.com <-- is invalid.
--------------------------------------------------------------------
USAGE
=====
Like the normal file copiers, wildcards are permitted. For example:-
A:COPY fr*.* b: <-- will copy all files matching FR??????.??? from A: to B:
-----------------------------
COPY allows multiple files to be specified on a single command line. In this
respect it is quite different from the MS-DOS COPY command. This makes COPY a
very, very powerful tool. For example:-
A:COPY fred.com nurk.doc mary.* smith.lbr b: <-- will copy all these files
from A: to B:
-----------------------------
COPY allows each filename to be preceded by its own drive/user identifier. For
example:-
A:COPY a8:fred.com c1:nurk.doc mary.* b: <-- will copy FRED.COM and NURK.DOC
from A8 and C1 respectively, to B0:
A:COPY 8:fred.com 0: <-- will copy FRED.COM from A8: to A0:
A8:COPY 0:fred.com b: <-- will copy FRED.COM from A0: to B8:
-----------------------------
COPY (v1.3n) does not frustratingly abort to the CP/M prompt when the
destination disk is full, as did previous versions. If the destination disk is
full, you will be asked whether you wish to exit (with ^C) or to continue
copying (RETURN) after changing destination disks. COPY, as from v1.30, may be
used as a file backup copier from a large disk to several smaller disks.
COPY v1.3n now also reports on screen if a file with the same name was erased
from the destination disk to complete the copy procedure. The apparent effect
is to over-write the old file. However, erasure of the old file is not done
until AFTER the whole file is successfully copied. If therefore, an error
occurs during the copying, the old file is not lost.
-----------------------------------------------------------------------
THE DASH OPTIONS
================
-a option
---------
Invoking the -a option allows you to copy only those source files which do not
have the archive bit set. This is especially useful where you have established
a backup procedure using the archive bit as a marker of altered files since the
last backup.
If this option is invoked, the source file has the archive bit set after it has
been successfully copied. This feature is consistent with the concept of using
the archive bit as a marker of having a backup copy elsewhere. The destination
files do not have the archive bit set.
For example,
A:COPY -a *.* b: <-- will copy only those source files in which the archive bit
is NOT set and will then set the archive bit on the source
files.
See ZSWP14 docs for more detail about the archive bit.
-----------------------------
-d option
---------
COPY allows copying to another disk in the same drive.
This feature is very handy if you have only one drive of a particular type, eg
3.5". The program prompts you when to change disks.
A:COPY -d bios.mac <-- will copy BIOS.MAC onto another disk in the A: drive.
The source and destination disks must be the same format.
-----------------------------
-n option
---------
COPY allows file renaming during copying. Use the -n option to copy file(s) and
give it (them) a new name. For example,
A:COPY -n fred.doc a:oldfred.doc <-- will produce a replica of FRED.DOC as
OLDFRED.DOC. Very handy when you want
the old file as a standby.
Only 2 filespecs are allowed in the command when renaming. However source and
destination filespecs may be ambiguous. In this manner, more than 1 file can be
copied and renamed. Destination drive and user are set from the second
(destination) filespec, with defaults applying as normal. The general form of
the command is,
COPY -n[vr] afile1 afile2
For example,
COPY -vn oldfred.* b4:newfred.* <-- will copy those files matching oldfred.*
from the current drive to drive B, user 4 as newfred.* with verify.
-----------------------------
-r option
---------
COPY will optionally reset the destination drive prior to copying.
A:COPY -r bios.* b: <-- will copy all BIOS files and log in the new disk prior
to trying to write the files. This avoids the dreaded
BDOS ERROR ON X: message when using most CP/M BDOS's.
-----------------------------
-v option
---------
COPY will optionally do a read verify of the written file. The verification is
reported before it deletes an old copy if one existed.
COPY v1.30 uses CRC checking rather than the checksum method used in previous
releases. In addition, COPY v1.3n no longer aborts to the CP/M prompt if a
verification error occurs. It reports the error and continues after
acknowledgement.
A:COPY -v bios.* b: <-- will copy all BIOS files with read verify and will
tell you so.
Please note that, if -v is not specified, there is no message to tell you that
verification was not done.
-----------------------------
NOTE PLEASE
-----------
COPY will allow you to invoke more than one option at a time. eg,
A:COPY -adnv fred.* a:oldfred.* <-- will copy non-archived files, in same
drive, rename while copying, with verification.
The order in which the options are typed is not important, ie, `adnv' is
equivalent to `vand'.
-----------------------------------------------------------------------
MISCELLANEOUS FEATURES
======================
If all the above was not enough to satisfy you, COPY allows you to exclude
certain files to be copied. This is best called the `minus' option. It appears
to be absolutely unique to COPY and is very handy indeed. It is definitely
worth remembering.
A:COPY bios.* -bios.com b: <-- will copy all BIOS files except BIOS.COM
A:COPY *.* -*.DOC b: <-- will copy all files but not the DOC files.
-----------------------------
Finally, COPY allows you to enter an interactive mode. This means that you can
repeatedly invoke new command lines without having to re-load COPY each time.
The prompt, while in this mode, is `COPY>'. For example,
A:COPY <-- enters interactive mode
COPY>fred.com b: <-- copies fred.com and stays in COPY....
COPY>mary.doc c: <-- copies mary.doc and stays in COPY....
COPY>-r mary.doc c: <-- copies mary.doc to a new disk in C: and stays in COPY
COPY><CR> <-- Pressing RETURN alone exits back to CP/M, normally
without doing a warm boot, but see configuration
option below.
-----------------------------
CONFIGURATION INFORMATION
=========================
At location 102 in the COM file is a byte which determines whether a warm boot
is done when COPY is finished. If this byte is set to FF, then the console
command processor (ZCPR, CP/M) space near the top of memory is also used for
storing files as they are copied, and so a warm boot is needed when the session
is finished. If that byte is 0, then the ccp space is not used, and the file
buffer is shortened by 2k, but no warm boot is necessary. The default value of
this byte is 0, and it can be changed to suit your needs using DDT, CEBUG,
PATCH etc.
Any problems or suggestions can be directed to:
Phil Cook
5 Lloyd Street
Northcote 3070
Victoria
Australia
--------------------------------- end -----------------------------------