home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / msdos / misc / 6196 < prev    next >
Encoding:
Text File  |  1992-11-17  |  2.1 KB  |  50 lines

  1. Newsgroups: comp.os.msdos.misc
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!att-out!cbfsb!cbnewsg.cb.att.com!rnichols
  3. From: rnichols@cbnewsg.cb.att.com (robert.k.nichols)
  4. Subject: COPYing binary files (was Re: Help: Software is here, printer is there)
  5. Message-ID: <1992Nov18.033431.12290@cbfsb.cb.att.com>
  6. Sender: news@cbfsb.cb.att.com
  7. Organization: AT&T
  8. References: <1992Nov15.010641.28325@leland.Stanford.EDU> <1992Nov16.232453.17042@spang.Camosun.BC.CA>
  9. Date: Wed, 18 Nov 1992 03:34:31 GMT
  10. Lines: 38
  11.  
  12. In article <1992Nov16.232453.17042@spang.Camosun.BC.CA> dbarker@spang.Camosun.BC.CA (Deryk Barker) writes:
  13. ...
  14. >Try using the /b(inary) qualifier to the copy command. Trying to do
  15. >the same thing to a HP IIP I got a similar result. Using /b cured it
  16. >(and, I think, removed the necessity for a manual press of the
  17. >FormFeed button); strangely enough I have *never* have to use /b when
  18. >copying executable from disk to disk.
  19. ...
  20.  
  21. The DOS "COPY" command has a built-in set of rules about whether to
  22. use ASCII or BINARY mode as a default.  It uses BINARY mode whenever a
  23. simple image copy is known to be safe.  Otherwise, it assumes ASCII
  24. mode.  Thus:
  25.  
  26.     1.    Copying a single file to another single file is done in binary;
  27.     whatever the old image represented, the copy wil be just the
  28.     same.
  29.  
  30.     2.    A many-to-many copy (using wildcards) is also done in binary,
  31.     since it is just multiple instances of case 1.
  32.  
  33.     3.    Concatenating multiple files onto a single target defaults to
  34.     ASCII, since there may be terminating CTRL-Z characters that
  35.     need to be stripped out in order to make a valid ASCII target.
  36.  
  37.     4.    Copying to a target device "known" to be ASCII is, of course,
  38.     performed in ASCII mode.  (... and we all know that printers,
  39.     COM ports, and the like are ASCII devices, right?  Well, "COPY"
  40.     is pretty certain that they are, anyway.)
  41.  
  42. Binary and ASCII modes are a relic of the CP/M filesystem, with which
  43. DOS still maintains a degree of compatibility (and you thought that
  44. 8088 compatibility was the only boat anchor that DOS was still dragging
  45. along!).
  46.  
  47. Bob Nichols
  48. AT&T Bell Laboratories
  49. rnichols@ihlpm.ih.att.com
  50.