home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
utils
/
sysutl
/
tools.lbr
/
CP.DZC
/
CP.DOC
Wrap
Text File
|
1987-08-06
|
3KB
|
92 lines
CP
This is my absolute favorite of all the programs in my library,
and also one of the most frequently used. It is a file copy
program, replacing PIP.
Unfortunately, I can't provide the program in this file, since CP
is a proprietary program. CP.C is a program provided with the BDS
C compiler, and is proprietary to BD Software, Inc.
So why provide the DOC file? Partly because CP is so important a
part of my library, and partly because, while proprietary, CP is
not that hard to get ahold of. Many users of CP/M systems have
BDS C (if you don't, waste no more time getting a copy), and Leor
Zolman of BDS has never been a stickler for Copyright laws. His
TELEDIT modem program, for example, which is also included in the
compiler package, is widely available on BBS's.CP has a very
flexible command format. The most straightforward usage is simply
CP <from> <to>
where <from> and <to> are unambiguous filenames. The filenames,
can, of course, include drive ID's. BDS also allows user areas,
with a rather unusual notation:
area/drive:
Example:
CP 0/A:FOO.BAR 15/B:XYZZY.COM
If the file is to be copied with the same name, the destination
name can be omitted, leaving just the destination user/drive:
CP FOO.BAR B:
This is probably the most often-used form of the command.
With this second form, you can also have multiple source
filenames, possibly including wildcards:
CP A.COM B.COM *.C B:
CP is smart enough to figure out that the last argument should be
a user/drive designation, for this form of the command.
Finally, there is one last neat feature: the character '.' stands
for the current user area/drive. So the command
CP B:*.COM .
says to copy all COM files on B: to the current area/drive.
Like most good programs, if you make a syntax error on the
command line, CP will give you an error message with correct
usage.
I have found one small bug in CP. It can copy specific files from
any user area/drive to any other. It can also copy lists of
files, including files with wildcard names, to any area/drive.
But it gets confused if you ask it to copy wildcard names from
a user area other than the default one. That is, it can handle
CP *.COM 4/B:
but not
CP 4/B:*.COM .
In this situation, CP doesn't crash or do anything nasty ... it
just tells you that it can't find the file. The solution is easy.
Just change user areas to area 4 (in the example), so you can use
the first form.
I frankly don't know how hard a time you will have getting a copy
of CP without getting it from BDS. I hope you will not find it
too difficult. It is entirely possible that it would be OK to
distribute the object of CP.COM, as long as one doesn't
distribute source. I don't know enough about the legalities of
such, and would rather err on the side of caution. If anyone can
establish that it's OK to distribute CP.COM, I will do so.
If you cannot find a copy of CP, don't despair! A public-domain
version, written in assembler language, is in the works by yours
truly.
Jack W. Crenshaw
P.O. Box 15888
Tampa, Fla. 33684
CIS 72325,1327