home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / utils / sysutl / tools.lbr / CP.DZC / CP.DOC
Text File  |  1987-08-06  |  3KB  |  92 lines

  1. CP
  2.  
  3. This  is my absolute favorite of all the programs in my  library,
  4. and  also  one    of the most frequently used.  It is a  file  copy
  5. program, replacing PIP.
  6.  
  7. Unfortunately, I can't provide the program in this file, since CP
  8. is a proprietary program. CP.C is a program provided with the BDS
  9. C  compiler,  and  is proprietary to  BD  Software,  Inc.
  10.  
  11. So why provide the DOC file?  Partly because CP is so important a
  12. part of my library,  and partly because, while proprietary, CP is
  13. not  that hard to get ahold of.  Many users of CP/M systems  have
  14. BDS C (if you don't, waste no more time getting a copy), and Leor
  15. Zolman    of BDS has never been a stickler for Copyright laws.  His
  16. TELEDIT modem program, for example, which is also included in the
  17. compiler  package,  is  widely  available  on BBS's.CP has a very
  18. flexible command format. The most straightforward usage is simply
  19.  
  20.      CP <from> <to>
  21.  
  22. where  <from> and <to> are unambiguous filenames.  The filenames,
  23. can,  of course,  include drive ID's. BDS also allows user areas,
  24. with a rather unusual notation:
  25.  
  26.      area/drive:
  27.  
  28. Example:
  29.  
  30.      CP 0/A:FOO.BAR 15/B:XYZZY.COM
  31.  
  32. If  the file is to be copied with the same name,  the destination
  33. name can be omitted, leaving just the destination user/drive:
  34.  
  35.      CP FOO.BAR B:
  36.  
  37. This is probably the most often-used form of the command.
  38.  
  39. With  this  second  form,  you    can  also  have  multiple  source
  40. filenames, possibly including wildcards:
  41.  
  42.      CP A.COM B.COM *.C B:
  43.  
  44. CP is smart enough to figure out that the last argument should be
  45. a user/drive designation, for this form of the command.
  46.  
  47. Finally, there is one last neat feature: the character '.' stands
  48. for the current user area/drive. So the command
  49.  
  50.      CP B:*.COM .
  51.  
  52. says to copy all COM files on B: to the current area/drive.
  53.  
  54. Like  most  good  programs,  if you make a syntax  error  on  the
  55. command  line,    CP  will give you an error message  with  correct
  56. usage.
  57.  
  58. I have found one small bug in CP. It can copy specific files from
  59. any  user  area/drive  to any other.  It can also copy    lists  of
  60. files,    including files with wildcard names,  to any  area/drive.
  61. But  it  gets confused if you ask it to copy wildcard names  from
  62. a user area other than the default one. That is, it can handle
  63.  
  64.      CP *.COM 4/B:
  65.  
  66. but not
  67.  
  68.      CP 4/B:*.COM .
  69.  
  70. In this situation,  CP doesn't crash or do anything nasty ...  it
  71. just tells you that it can't find the file. The solution is easy.
  72. Just change user areas to area 4 (in the example), so you can use
  73. the first form.
  74.  
  75. I frankly don't know how hard a time you will have getting a copy
  76. of  CP without getting it from BDS.  I hope you will not find  it
  77. too  difficult.   It is entirely possible that it would be OK  to
  78. distribute  the  object  of  CP.COM,   as  long  as  one  doesn't
  79. distribute  source.  I don't know enough about the legalities  of
  80. such,  and would rather err on the side of caution. If anyone can
  81. establish that it's OK to distribute CP.COM, I will do so.
  82.  
  83. If you cannot find a copy of CP,  don't despair!  A public-domain
  84. version,  written in assembler language, is in the works by yours
  85. truly.
  86.  
  87. Jack W. Crenshaw
  88. P.O. Box 15888
  89. Tampa, Fla. 33684
  90. CIS 72325,1327
  91.  
  92.