home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug144.arc / ARCOPY21.LBR / ARCOPY.DZC / ARCOPY.DOC
Text File  |  1979-12-31  |  19KB  |  438 lines

  1.  
  2.  
  3.  
  4.  
  5.                                ARCOPY.DOC
  6.                                ----------
  7.                       Instructions for ARCOPY.COM
  8.                          Version 2.1 - 3/21/88
  9.  
  10.                            (c)1988 Eric Meyer
  11.  
  12.  
  13.                             1. INTRODUCTION
  14.  
  15. ARCOPY (ARchive COPY) is a small, fast file copy utility for all Z80 CPM
  16. (2.2 or 3.0) systems.  With ARCOPY you can easily copy files:
  17.  
  18.   * while changing disks             * selectively (with Yes/No prompts)
  19.   * to/from any CP/M user areas      * only if new (not on destination)
  20.   * to different destination names   * only if already on destination
  21.   * to/from the console and printer  * only if changed since last backup
  22.   * with PIP or MSDOS COPY syntax    * with deletion of original file
  23.  
  24.  
  25.                         2. AN ALTERNATIVE TO PIP
  26.  
  27. Though ARCOPY has several sophisticated options for selective file copy-
  28. ing, it can also simply function as a substitute for PIP. ARCOPY is just
  29. as fast, and quite a bit  smaller,  though  it has all the commonly used
  30. functions of PIP; in fact you can rename it to PIP.COM if you want.  But
  31. note the following extra features:
  32.  
  33.   *- ARCOPY automatically resets the disks under CP/M 2.2 before copying
  34.      (including between commands, in resident mode). This means that you
  35.      can swap disks as desired without BDOS R/O errors.
  36.  
  37.   *- Especially when backing up floppy disks, you often have the problem
  38.      that both disks are relatively full.  Despite the fact that the re-
  39.      placement file should fit, PIP  may  run  out of space, as it won't
  40.      erase the existing file until after it's copied the new one. ARCOPY
  41.      doesn't require this extra free space; it always erases  the exist-
  42.      ing file first.  (Use caution -- or PIP -- in situations where this
  43.      could be a problem.)
  44.  
  45.   *- ARCOPY processes files  in alphabetical order.  This, combined with
  46.      the individual Confirm (Y/N) option, makes it a sort  of mini-SWEEP
  47.      utility.
  48.  
  49.   *- ARCOPY supports ZCPR-style  user numbers "Duu:" (like B12:GORT.TXT)
  50.      in both arguments.  This is a lot easier than PIP's "[Guu]" option.
  51.  
  52.   *- ARCOPY can rename groups of files, or copy while renaming:  for ex-
  53.      ample, you can copy *.TXT to *.DOC. It's even clever enough to copy
  54.      *.* to *.BAK, if that will work in a given situation.
  55.  
  56.   *- ARCOPY accepts the same syntax as PIP; but it can also operate like
  57.      the MS-DOS COPY command (source  then destination, rather than vice
  58.      versa).  One nice result is that if you rename ARCOPY  to COPY.COM,
  59.      you will  be  able to move files around with the same command as on
  60.      MS-DOS: A>COPY SOURCE DEST.  This  will  make life less complicated
  61.      for those who (like me) are finally making the transition to MSDOS.
  62.  
  63.  
  64.  
  65.  
  66.      Do keep a copy of the "real" PIP.COM around; it's a versatile beast
  67.      and ARCOPY can't quite do everything that PIP  can.  ARCOPY doesn't
  68.      concatenate files,  and  supports  only a subset of PIP options and
  69.      devices (see below).
  70.  
  71.  
  72.                           3. SELECTIVE COPYING
  73.  
  74.      Keeping backup copies of valuable  data is very important; however,
  75. it can often be enough of a pain to discourage you from doing it. (Copy-
  76. ing an entire disk takes a long time; copying just  what  you  think you
  77. might have changed recently is unreliable.)  By automating tedious back-
  78. up tasks,  ARCOPY should encourage you to play it safe.  Situations that
  79. arise when constructing or updating backup disks are:
  80.  
  81.         The need to copy onto the backup disk ONLY files that do
  82.     NOT already exist  on the backup disk.  (As when you want to
  83.     copy some new files, but don't need to recopy the old ones.)
  84.  
  85.         The need to copy ONLY files that DO already exist on the
  86.     backup disk.  (As when  other  files are backed up  on other
  87.     disks.)
  88.  
  89.         The need to systematically rename a whole group of files
  90.     while copying them.
  91.  
  92.         The need to select just a few assorted files to copy.
  93.  
  94.      ARCOPY's ability to do all this, along with the choice of appropri-
  95. ate filenames, makes backing up  data  far more convenient, even if your
  96. CP/M system doesn't support an Archive attribute.  If it does,  read on.
  97.  
  98.  
  99.                          4. INCREMENTAL BACKUP
  100.  
  101.      Suppose you have a disk with a number of files on it, a few of them
  102. hving been changed recently.  How  do  you update your backup copy?  You
  103. can always wipe it clean and recopy everything; but it would be  nice if
  104. you could  just  copy  exactly  those  things that need it ("incremental
  105. backup").
  106.  
  107.      CP/M 3.0 maintains  a  file  attribute  (analogous to Read/Only and
  108. System) called Archive.  Whenever a disk file is  modified,  this attri-
  109. bute is  cleared.  Consequently,  if this attribute was set in the past,
  110. the files which now lack it are those you have created or changed since,
  111. and need to back up  now.  CP/M  3.0  PIP  includes an option "[A" which
  112. uses this attribute to provide incremental backup: it copies  only files
  113. which are not marked as Archived, and then marks them so.
  114.  
  115.  
  116.  
  117.  
  118.      ARCOPY can do the  same  thing,  even under CP/M 2.2.  However, 2.2
  119. does not, as a rule, properly support the Archive attribute: there is no
  120. guarantee that it will be cleared as it should  be  whenever  a  file is
  121. modified (though  apparently it will not be accidentally cleared if once
  122. set).  Some OS enhancements (eg, ZCPRx) may add full support for the Ar-
  123. chive bit; check your documentation.  Failing  this, it is also possible
  124. to maintain the "A" attribute manually, using a utility  like  my DA.COM
  125. to set  or  remove  it.  In particular, you can set the attribute on all
  126. files to begin with and then  remove  it  from files when they are modi-
  127. fied; then ARCOPY will back up just those files.
  128.  
  129.  
  130.                             5. USING ARCOPY
  131.  
  132. SYNTAX:      A>ARCOPY {sourcefil {destfil} {[options]}     "{}"=optional
  133.         or            {destfil=sourcefil {[options]}}
  134.  
  135.         If the file arguments are separated by an "=", they will
  136.         be interpreted as PIP would, in  destination, source or-
  137.         der.  If they are only separated by spaces, they will be
  138.         taken in MSDOS COPY order as source, destination.  If NO
  139.         arguments  are given, ARCOPY  will load into  memory and
  140.         give you an interactive  prompt ("-").  You can then en-
  141.         ter one copy command after another.  To exit, just press
  142.         RETURN or ^C.
  143.  
  144.         Either filespec  may be ambiguous; destination  name de-
  145.         faults to same as source.  In addition, ZCPR-style Drive
  146.         User specifications (Duu:) are supported.  If not speci-
  147.         fied,  drive  and  user  default  to the current values.
  148.         Common device names (eg. CON:) are also  accepted.  "Op-
  149.         tions" must be preceded by "["; separating  spaces and a
  150.         closing "]" are optional. You may select one or more of:
  151.  
  152.   ** A - ARCHIVE (incremental backup)   N - NEW (NONexisting) files only
  153.    * C - CONFIRM each file copy (Y/N) * R - READ System files too
  154.      D - DELETE original after copy   * W - WRITE over Read/Only files
  155.      E -  EXISTING files only         * Z -  ZERO parity bit
  156.  
  157.      (* - Options in common with CP/M 2.2 PIP;  ** - CP/M 3.0 PIP only)
  158.  
  159.      ARCOPY resets disks before attempting to copy files.  For ambiguous
  160. (group) copying, it alphabetically lists  each file being processed; you
  161. may abort at any time by typing ^C.  By DEFAULT all specified files will
  162. be copied from the source to the  destination  disk.  Copies  retain the
  163. same attributes as the original, except Archive which is always cleared.
  164. Files with the SYStem attribute will be ignored.  However:
  165.  
  166.      If you specify the "A"  option,  only files without the Archive at-
  167. tribute will be copied; and as each is backed up, the original will have
  168. its Archive attribute set.  (See above for further explanation.)
  169.  
  170.      If you specify "C", along  with  an ambiguous filename, you will be
  171. prompted "y/n?" for each file about to be copied.  Press "Y" to copy the
  172. file, or "N" to skip it.  (If the "A" option is also in force,  the file
  173. will be marked as Archived whether copied or not.)
  174.  
  175.  
  176.  
  177.  
  178.      If you specify "D", each  source  file  will be deleted after it is
  179. copied, allowing you to simply move files  from  one  place  to another.
  180. NOTE: If  the source and destination directories are the same, ARCOPY is
  181. clever enough to  recognize  this  as  a  request  to  simply RENAME the
  182. file(s).
  183.  
  184.      If you specify "E", only those files that already EXIST on the des-
  185. tination disk will be  copied.  (Note  that  the DESTINATION name is the
  186. one considered here, rather the source name, if these differ.)
  187.  
  188.      If you specify "N", only those  files  that are NEW (do NOT already
  189. exist on the destination disk) will  be  copied.  (Note  that  you can't
  190. specify both "E" and "N", as they are mutually exclusive.)
  191.  
  192.      If you specify "R", SYStem files  will be copied as well; otherwise
  193. they are ignored.
  194.  
  195.      If you specify "W", Read/Only  files may be overwritten; otherwise,
  196. any attempt to delete them will cause a BDOS R/O error.
  197.  
  198.      If you specify "Z", ARCOPY will  zero  the high (parity) bit on all
  199. output data.  This can be useful for converting  nonstandard  data (like
  200. WordStar text files) into standard ASCII form.
  201.  
  202.  
  203.                            6. ABOUT RENAMING
  204.  
  205.      If you are copying to a  different  name, ARCOPY will show you both
  206. the original and destination name, eg:  OLDFIL.NAM -> NEWFIL.NAM.
  207.  
  208.      Copying multiple files  to  different  names can get confusing.  If
  209. the wildcards match exactly (as in *.DOC to *.BAK)  it's straightforward
  210. enough (although PIP can't do it).  But ARCOPY also lets you do stranger
  211. copies, which  may  or  may not work depending on the specific filenames
  212. encountered.  Suppose you have these  three files on drive A:  GORT.TXT,
  213. KLAATU.DOC, NIKTO.  You want to create some extra  backups  on  drive B.
  214. You might type:
  215.                           A>ARCOPY *.* B:*.BAK
  216.  
  217. Despite the fact that  most  utilities  would  refuse this request, it's
  218. perfectly clear what you want, and ARCOPY will do it:
  219.  
  220.   GORT.TXT, KLAATU.DOC, NIKTO  --->  B:GORT.BAK, KLAATU.BAK, NIKTO.BAK
  221.  
  222.      But suppose there had been  a fourth file A:GORT.NOT.  Because both
  223. it and GORT.TXT would get copied  to  the  same  destination B:GORT.BAK,
  224. which is  likely  to be a bad idea, in this case ARCOPY would refuse the
  225. (same!) copy request.  Rather than  give  up in principle, because there
  226. might be trouble, ARCOPY looks ahead at what the actual results of copy-
  227. ing would be.  If no conflict would arise, ARCOPY will do it.  If a file
  228. would overwrite itself, or two files copy to the same destination, or an
  229. illegal filename be constructed, ARCOPY gives an error  message,  and no
  230. files are copied.
  231.  
  232.  
  233.  
  234.  
  235.      ARCOPY is also a mass renaming  utility.  If you use the "D" option
  236. when the source and destination directories are the same ARCOPY realizes
  237. it doesn't actually have to copy the file(s), but can just  rename them.
  238. All the rules above apply.
  239.  
  240.  
  241.                             6. ABOUT DEVICES
  242.  
  243.      ARCOPY recognizes several  CP/M  "device  names" as substitutes for
  244. filename arguments: CON, CRT, PRN, LST, NUL.  Device names  may  be fol-
  245. lowed by a colon (eg. CON:) or not, as desired.  Devices allow ARCOPY to
  246. transfer data between any combination of the terminal, printer, and disk
  247. files.  Data sent  to/from  any  device  is treated as a stream of bytes
  248. terminated by a ^Z.
  249.  
  250.         CON: Console.  When used as a source ARCOPY accepts any-
  251.              thing you type in as input; type ^Z to finish. When
  252.              used as a destination, the data will be sent to the
  253.              screen.  This device  expands tabs, filters control
  254.              codes  (eg, "^[" for ESC), and  allows  you to quit
  255.              with ^C or pause output with ^S.
  256.  
  257.         CRT: Terminal. A more basic console I/O device that does
  258.              not expand tabs, filter output or respond to ^S/^C.
  259.              Useful for setting screen attributes.
  260.  
  261.         PRN: Printer. Can only be used as a destination.  Output
  262.              will be sent to  the printer, with a formfeed added
  263.              every 60 lines to paginate it.
  264.  
  265.         LST: List device.  A more  basic  printer  output device
  266.              that does  not add any extra formfeeds.  Useful for
  267.              initialization codes, or files with their own pagi-
  268.              nation.
  269.  
  270.         NUL: Null.  When used  as a source, this  creates an im-
  271.              mediate EOF (no data).  When used as a destination,
  272.              no output  at all is created.  Useful for  creating
  273.              empty files, or suppressing output  in batch files.
  274.  
  275.  
  276.      In most other respects  ARCOPY  handles device input/output just as
  277. PIP does.  One notable exception is that device I/O is  buffered  in the
  278. same way  as disk input, rather than sent a character at a time.  (Other
  279. points:  PIP numbers lines on output to PRN:, and doesn't recognize CRT:
  280. ARCOPY doesn't allow RDR, PUN,  or  AUX;  CP/M never supported these de-
  281. vices well enough for them to be useful anyway.)
  282.  
  283.      When you use devices you  cannot  use wildcards or the options "A",
  284. "C","D", "E" or "N", which refer to file  copying  only.  (Note:  as the
  285. devices are  reserved  names, you can't refer to disk files named "CON",
  286. etc., unless you do it with wildcards!)
  287.  
  288.  
  289.  
  290.  
  291.                            7. USAGE EXAMPLES
  292.  
  293.      Each example shows MS-DOS COPY syntax on the left PIP syntax
  294.      on the right.
  295.  
  296.  
  297. A>ARCOPY B:GORT [dw]            or   A>ARCOPY A:=B:GORT [dw]
  298.  
  299.      The file B:GORT will be copied to drive A: and then deleted
  300.      from drive B: even if it was Read/Only.
  301.  
  302.  
  303. A>ARCOPY *.Z80 *.ASM [d]        or   A>ARCOPY *.ASM=*.Z80 [d]
  304.  
  305.      Every file  A:*.Z80  will get  renamed with an extension of
  306.      .ASM instead.  (ARCOPY  recognizes  that no actual  copying
  307.      has to be done.)
  308.  
  309.  
  310. A>ARCOPY *.* *.BAK              or   A>ARCOPY *.BAK=*.*
  311.  
  312.      If all goes well, a copy of every file  on drive A: will be
  313.      created with a filetype of ".BAK".  However, this might not
  314.      work; ARCOPY  will  refuse  to  do it  if filename problems
  315.      would result.
  316.  
  317.  
  318. A0>ARCOPY 1:*.DOC *.TXT [zc]    or   A0>ARCOPY *.TXT=1:*.DOC [zc]
  319.  
  320.      Each file of type ".DOC" on drive A: user 1  will be copied
  321.      to user 0, with the  same name but type  ".TXT"  instead of
  322.      ".DOC".  In the process, the high bit will be zeroed out to
  323.      convert to standard  ASCII.  You will be  asked  to confirm
  324.      each item to copy individually.
  325.  
  326.  
  327. A>ARCOPY *.* B: [ae]            or   A>ARCOPY B:=*.* [ae]
  328.  
  329.       All files on A: which  require archiving  (see explanation
  330.       above) and which  already  exist  on drive B: will  be ar-
  331.       chived to B:.  (This allows you to archive the contents of
  332.       one directory on more than one floppy disk.)
  333.  
  334.  
  335. A>ARCOPY b:*.COM [nr]           or   A>ARCOPY A:=B:*.COM [nr]
  336.  
  337.       All files  B:*.COM  (including SYStem files)  which do not
  338.       already exist on drive A: will be copied to draive A: from
  339.       drive B:
  340.  
  341.  
  342. A>ARCOPY B:GORT.DOC CON [z]     or   A>ARCOPY CON:=B:GORT.DOC [z]
  343.  
  344.       The file B:GORT.DOC will be typed out on screen, stripping
  345.       off any high bits set.  This is a handy way  to view Word-
  346.       Star documents.
  347.  
  348.  
  349.  
  350.  
  351. A0>ARCOPY 10:PROG.ASM PRN       or   A0>ARCOPY PRN:=10:PROG.ASM
  352.  
  353.       The file  A10:PROG.ASM  will be sent  to the printer, with
  354.       pagination.
  355.  
  356.  
  357. A>ARCOPY NUL -LETTERS           or   A>ARCOPY -LETTERS=NUL:
  358.  
  359.       A true empty (0k) file  A:-LETTERS  will be created.  Such
  360.       files are a popular  way to identify  or date  disk direc-
  361.       tories.
  362.  
  363.  
  364. A>ARCOPY CON LST                or   A>ARCOPY LST:=CON:
  365.  
  366.       Anything you type in  will be sent to the printer.  Useful
  367.       for sending setup codes, etc.  Exit with ^Z.  If you abort
  368.       with ^C nothing happens.O)
  369.  
  370.  
  371. A>ARCOPY CON CRT                or   A>ARCOPY CRT:=CON:
  372.  
  373.       Anything you type  in will be sent  back to the screen af-
  374.       terwards, but without  control filtering.  Useful for set-
  375.       ting screen attributes, etc.
  376.  
  377.  
  378.  
  379.                            8. ERROR MESSAGES
  380.  
  381. These errors indicate that no copying has been done:
  382.  
  383.     NO FILE     There were no  source  files matching all given criteria
  384.                    (Filename, existence on destination,  archive status)
  385.    <BAD ARGT>   Missing or invalid argument; think (read?) and try again
  386.    <BAD DEV>    Invalid device name or usage (see DEVICES)
  387.    <TOO MANY>   ARCOPY can't process more than 255 files; be more speci-
  388.                    fic.
  389.    <SAME ITEM>  A file destination would  have  been the same as its own
  390.                    source
  391.    <CONFLICT>   Two source files would have  copied to the same destina-
  392.                    tion
  393.    <ILLEGAL>    A file with an illegal  name would have been constructed
  394.  
  395.  
  396. These errors can occur in the middle of copying:
  397.  
  398.    <I/O ERR>    BDOS disk error, probably bad file or full disk
  399.    <ABORTED>    Somebody typed ^C
  400.  
  401.  
  402.      If something causes ARCOPY to  terminate  while copying to disk, an
  403. incomplete work file of type ".$$$" may get left behind.
  404.  
  405.      Please note that ARCOPY does  require  a Z80 CPU or equivalent.  It
  406. will not run on 8080/85 CP/M systems.
  407.  
  408.  
  409.  
  410.  
  411.                                9. HISTORY
  412.  
  413.      ARCOPY v1.0 (1986) was the  first  release of this program, chiefly
  414. intended to provide incremental backup for CP/M 2.2 users. However, this
  415. often didn't work properly under CP/M 2.2 systems, so...
  416.  
  417.      ARCOPY v2.0 (1988)  added  many  improvements including MSDOS COPY-
  418. like syntax, alphabetization, user number support, and the  "E"  and "N"
  419. options to enhance the choices for selective backup.
  420.  
  421.             v2.1 (3/88) - copies to/from devices; allows renaming during
  422. ambiguous copying; adds "D"elete option; fixes display column bug.
  423.  
  424.  
  425.      ARCOPY and its documentation  are  (c)1988  E.Meyer, all rights re-
  426. served.  They may be freely distributed, but not  modified  or  sold for
  427. profit without  my  written consent.  The user takes full responsibility
  428. for any damages resulting  from  the  use  (or  misuse) of this program.
  429. Please report any problems encountered.
  430.  
  431.                                Eric Meyer
  432.                           427 N. Washington #4
  433.                          Bloomington, IN  47401
  434.                         CompuServe [74415,1305]
  435.  
  436. --------------------------------- end ----------------------------------
  437.  
  438.