home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug144.arc / COPY131.LBR / COPY.DZC / COPY.DOC
Text File  |  1979-12-31  |  15KB  |  346 lines

  1.                    DOCUMENTATION FOR COPY.COM
  2.                    ==========================
  3.  
  4.                           March 1988
  5.  
  6. COPY (or CP) is simply a utility to copy files, but it has many features which
  7. make it outstandingly useful and versatile. It is an upgrade of that old
  8. workhorse of a file copier, ZIP.COM, which has been around for many years.
  9.  
  10. COPY is limited to use on a Z80 based computer running CP/M 2.2, 3.n, or ZCPR.
  11. What a pity there's nothing as easily powerful in the MS-DOS world!
  12.  
  13. COPY version 1.3n introduced two new features, the ability to continue after a
  14. `DISK FULL' is encountered and an option to copy un-archived files.
  15.  
  16. COPY is a `buffered' file copier, ie, it uses all available TPA for buffering
  17. file read and writes. It reads as much as it can into memory before switching
  18. drives to write the files. In this respect it differs from most other files
  19. copiers, eg, PIP, SWEEP, etc, which read and write one file at a time. This
  20. makes it much, much faster.
  21.  
  22. COPY has command-line and interactive modes. Command-line mode means you enter
  23. the file information after the command "COPY", and return to the system when
  24. the copying is complete. Interactive mode means that you stay in the copy
  25. utility until you decide to exit. To enter interactive mode, just type COPY<CR>
  26. in response to the operating system prompt. When finished, pressing just <CR>
  27. at the COPY prompt will exit to the system again.
  28.  
  29. COPY provides comprehensive advice on just what it's up to and, when finished,
  30. tells you how many files were copied, and whether they were verified.
  31.  
  32. Brief on-line help is obtainable by entering a single character after the verb,
  33. e.g. COPY ?  (or by making a mistake in the command line).
  34.  
  35.     -----------------------------------------------------------------------
  36.  
  37. COPY's features may be broadly divided into two main categories:
  38.  
  39. 1. Different methods of defining on the command line, what file(s) is(are) to
  40.    be copied. This is syntax related.
  41.  
  42. 2. Different options which may be invoked for the copying procedure, ie, the
  43.    'dash' options. The dash options are
  44.  
  45. -a  (A)rchive. Copy non-archived files only
  46. -d  (D)isk change (single drive copy)
  47. -n  re(N)ame file while copying
  48. -r  (R)elog disk
  49. -v  (V)erify after copying
  50.  
  51.      -----------------------------------------------------------------------
  52.  
  53. COMMAND LINE SYNTAX
  54. ===================
  55.  
  56. Please note especially that the `normal' CP/M (ridiculous) back-to-front syntax
  57. for source and destination does NOT apply. The syntax for COPY is that the
  58. source comes before the destination so that when typing the command, you are
  59. saying: "Please ...
  60.  
  61. copy FROM the source, the files I want, TO the Destination  .... thankyou."
  62.      ----                               --
  63.  
  64. The actual form for the command line syntax for COPY is,
  65.  
  66.   COPY [-o] [S[u]:]afile1 .. [S[u]:]afile10 [D[#]:]
  67.  
  68. If this seems daunting, please see the various examples offered below.
  69.  
  70. For COPY's interactive mode (see near the end of these docs), the syntax for
  71. the commands is the same, except that you do not need to type "COPY" for each
  72. separate command line.
  73.  
  74. COPY>[-o] [S[u]:afile1 .. [S[uu]:afile10 [D[#]:]
  75.  
  76.  where
  77.  `o' is one or more of the dash options,
  78.  `S' is source drive letter,      `u' is source user number,
  79.  `afile' is an ambiguous file name, ie, name can contain `?' or `*'
  80.  `D' is destination drive letter, `#' is destination user number.
  81.  
  82. In the above general command form, anything enclosed in square brackets [] is
  83. optional.
  84.  
  85. `S' and `u' may be different for each file in the list. `u' may be *, which
  86. allows files from any user area to be found for copying. eg, A*: will find a
  87. file in user 15 on drive A:. You therefore don't need to remember where all the
  88. files may be located.
  89.  
  90. `#' may not be *, which is pretty obvious really. You don't want to copy the
  91. same files to every user area on the destination disk.
  92.  
  93. If any file in the list doesn't have an associated drive or user, or no
  94. destination drive/user is provided, then current defaults are assumed for
  95. these.
  96.  
  97. A space delimits all parameters, ie, dash options, drive designators, file
  98. names.
  99.  
  100. The colon character `:' always defines the preceding alphanumeric characters as
  101. a location, and this applies to both the source and destination. A letter
  102. implies a drive; a number implies a user number. For example,
  103.  
  104. A:  <-- is drive A
  105. 2:  <-- is user 2 on current drive
  106. B2:  <-- is user 2 on drive B
  107. C15:  <-- is user 15 on drive C
  108.  
  109.                         -----------------------------
  110.  
  111. You MUST specify either the source OR destination OR both and they must be
  112. different (with one exception - see below). For example, assuming you are
  113. logged onto A0:, i.e., user 0 on drive A,
  114.  
  115. A:COPY fred.com       <-- is invalid because no different destination is
  116.                            specified.
  117. A:COPY b:fred.com a:  <-- is valid because the location of the source file is
  118.                            different to the destination drive.
  119. A:COPY b:fred.com     <-- is valid because the location of the source file is
  120.                            different to the logged drive
  121. A:COPY a:fred.com     <-- is invalid because the location of the destination
  122.                            drive (logged drive) is not different to the source.
  123. A:COPY fred.com 1:    <-- is valid because the destination is to a different
  124.                            user area.
  125. A:COPY 1:fred.com     <-- is valid because the source is different to the
  126.                            logged drive.
  127.  
  128. Exception: If you are copying to another disk in the same drive, the source and
  129. destination may be the same. To avoid COPY from seeing it as a syntax error and
  130. to ensure that you really do want to copy to another disk, you must use the
  131. dash option, -d. For example,
  132.  
  133. A:COPY -d fred.com    <-- is valid because you have invoked the single drive
  134.                            option. This will copy FRED.COM to another disk in
  135.                            drive A:. COPY will prompt you when to change disks.
  136.  
  137.                         -----------------------------
  138.  
  139. A file name without an extent should be entered as `FRED.' surrounded by
  140. delimiting spaces. Note the period. For example,
  141.  
  142. A:COPY bios.com fred. nurk.doc b:
  143.  
  144.                         -----------------------------
  145.  
  146. The placement (order) of the various components on the command line is
  147. important. For example the dash options must be in the first field on the
  148. command line.
  149.  
  150. A:COPY -n fred.com b:frednew.com  <-- is valid.
  151. A:COPY fred.com -n b:frednew.com  <-- is invalid.
  152.  
  153.     --------------------------------------------------------------------
  154.  
  155. USAGE
  156. =====
  157.  
  158. Like the normal file copiers, wildcards are permitted. For example:-
  159.  
  160. A:COPY fr*.* b:  <-- will copy all files matching FR??????.??? from A: to B:
  161.  
  162.                         -----------------------------
  163.  
  164. COPY allows multiple files to be specified on a single command line. In this
  165. respect it is quite different from the MS-DOS COPY command. This makes COPY a
  166. very, very powerful tool. For example:-
  167.  
  168. A:COPY fred.com nurk.doc mary.* smith.lbr b:   <-- will copy all these files
  169.                                                    from A: to B:
  170.  
  171.                         -----------------------------
  172.  
  173. COPY allows each filename to be preceded by its own drive/user identifier. For
  174. example:-
  175.  
  176. A:COPY a8:fred.com c1:nurk.doc mary.* b: <-- will copy FRED.COM and NURK.DOC
  177.                                 from A8 and C1 respectively, to B0:
  178. A:COPY 8:fred.com 0:   <-- will copy FRED.COM from A8: to A0:
  179. A8:COPY 0:fred.com b:  <-- will copy FRED.COM from A0: to B8:
  180.  
  181.                         -----------------------------
  182.  
  183. COPY (v1.3n) does not frustratingly abort to the CP/M prompt when the
  184. destination disk is full, as did previous versions. If the destination disk is
  185. full, you will be asked whether you wish to exit (with ^C) or to continue
  186. copying (RETURN) after changing destination disks. COPY, as from v1.30, may be
  187. used as a file backup copier from a large disk to several smaller disks.
  188.  
  189. COPY v1.3n now also reports on screen if a file with the same name was erased
  190. from the destination disk to complete the copy procedure. The apparent effect
  191. is to over-write the old file. However, erasure of the old file is not done
  192. until AFTER the whole file is successfully copied. If therefore, an error
  193. occurs during the copying, the old file is not lost.
  194.  
  195.      -----------------------------------------------------------------------
  196.  
  197. THE DASH OPTIONS
  198. ================
  199.  
  200. -a option
  201. ---------
  202. Invoking the -a option allows you to copy only those source files which do not
  203. have the archive bit set. This is especially useful where you have established
  204. a backup procedure using the archive bit as a marker of altered files since the
  205. last backup.
  206.  
  207. If this option is invoked, the source file has the archive bit set after it has
  208. been successfully copied. This feature is consistent with the concept of using
  209. the archive bit as a marker of having a backup copy elsewhere. The destination
  210. files do not have the archive bit set.
  211.  
  212. For example,
  213.  
  214. A:COPY -a *.* b: <-- will copy only those source files in which the archive bit
  215. is NOT set and will then set the archive bit on the source
  216. files.
  217.  
  218. See ZSWP14 docs for more detail about the archive bit.
  219.  
  220.                         -----------------------------
  221. -d option
  222. ---------
  223. COPY allows copying to another disk in the same drive.
  224.  
  225. This feature is very handy if you have only one drive of a particular type, eg
  226. 3.5". The program prompts you when to change disks.
  227.  
  228. A:COPY -d bios.mac  <-- will copy BIOS.MAC onto another disk in the A: drive.
  229.  
  230. The source and destination disks must be the same format.
  231.  
  232.                         -----------------------------
  233. -n option
  234. ---------
  235. COPY allows file renaming during copying. Use the -n option to copy file(s) and
  236. give it (them) a new name. For example,
  237.  
  238. A:COPY -n fred.doc a:oldfred.doc  <-- will produce a replica of FRED.DOC as
  239.                                       OLDFRED.DOC. Very handy when you want
  240.                                       the old file as a standby.
  241.  
  242. Only 2 filespecs are allowed in the command when renaming. However source and
  243. destination filespecs may be ambiguous. In this manner, more than 1 file can be
  244. copied and renamed. Destination drive and user are set from the second
  245. (destination) filespec, with defaults applying as normal. The general form of
  246. the command is,
  247.  
  248. COPY -n[vr] afile1 afile2
  249.  
  250. For example,
  251.  
  252. COPY -vn oldfred.* b4:newfred.*  <-- will copy those files matching oldfred.*
  253. from the current drive to drive B, user 4 as newfred.* with verify.
  254.  
  255.                         -----------------------------
  256.  
  257. -r option
  258. ---------
  259. COPY will optionally reset the destination drive prior to copying.
  260.  
  261. A:COPY -r bios.* b:  <-- will copy all BIOS files and log in the new disk prior
  262.                          to trying to write the files. This avoids the dreaded
  263.                          BDOS ERROR ON X: message when using most CP/M BDOS's.
  264.  
  265.                         -----------------------------
  266.  
  267. -v option
  268. ---------
  269. COPY will optionally do a read verify of the written file. The verification is
  270. reported before it deletes an old copy if one existed.
  271.  
  272. COPY v1.30 uses CRC checking rather than the checksum method used in previous
  273. releases. In addition, COPY v1.3n no longer aborts to the CP/M prompt if a
  274. verification error occurs. It reports the error and continues after
  275. acknowledgement.
  276.  
  277. A:COPY -v bios.* b:  <-- will copy all BIOS files with read verify and will
  278.                           tell you so.
  279.  
  280. Please note that, if -v is not specified, there is no message to tell you that
  281. verification was not done.
  282.  
  283.                         -----------------------------
  284.  
  285. NOTE PLEASE
  286. -----------
  287. COPY will allow you to invoke more than one option at a time. eg,
  288.  
  289. A:COPY -adnv fred.* a:oldfred.*  <-- will copy non-archived files, in same
  290.                         drive, rename while copying, with verification.
  291.  
  292. The order in which the options are typed is not important, ie, `adnv' is
  293. equivalent to `vand'.
  294.  
  295.      -----------------------------------------------------------------------
  296.  
  297. MISCELLANEOUS FEATURES
  298. ======================
  299.  
  300. If all the above was not enough to satisfy you, COPY allows you to exclude
  301. certain files to be copied. This is best called the `minus' option. It appears
  302. to be absolutely unique to COPY and is very handy indeed. It is definitely
  303. worth remembering.
  304.  
  305. A:COPY bios.* -bios.com b:  <-- will copy all BIOS files except BIOS.COM
  306. A:COPY *.* -*.DOC b:        <-- will copy all files but not the DOC files.
  307.  
  308.                         -----------------------------
  309.  
  310. Finally, COPY allows you to enter an interactive mode. This means that you can
  311. repeatedly invoke new command lines without having to re-load COPY each time.
  312. The prompt, while in this mode, is `COPY>'. For example,
  313.  
  314. A:COPY               <-- enters interactive mode
  315. COPY>fred.com b:     <-- copies fred.com and stays in COPY....
  316. COPY>mary.doc c:     <-- copies mary.doc and stays in COPY....
  317. COPY>-r mary.doc c:  <-- copies mary.doc to a new disk in C: and stays in COPY
  318. COPY><CR>            <-- Pressing RETURN alone exits back to CP/M, normally
  319.                          without doing a warm boot, but see configuration
  320.                          option below.
  321.  
  322.                         -----------------------------
  323.  
  324. CONFIGURATION INFORMATION
  325. =========================
  326.  
  327. At location 102 in the COM file is a byte which determines whether a warm boot
  328. is done when COPY is finished. If this byte is set to FF, then the console
  329. command processor (ZCPR, CP/M) space near the top of memory is also used for
  330. storing files as they are copied, and so a warm boot is needed when the session
  331. is finished. If that byte is 0, then the ccp space is not used, and the file
  332. buffer is shortened by 2k, but no warm boot is necessary. The default value of
  333. this byte is 0, and it can be changed to suit your needs using DDT, CEBUG,
  334. PATCH etc.
  335.  
  336.  
  337. Any problems or suggestions can be directed to:
  338.  
  339.               Phil Cook
  340.               5 Lloyd Street
  341.               Northcote 3070
  342.               Victoria
  343.               Australia
  344.  
  345.    ---------------------------------  end  -----------------------------------
  346.