home *** CD-ROM | disk | FTP | other *** search
/ Executor 2.0 / executorv2.0.iso / pc / dos / extra / docs / maillist / text / archive.96 / text4099.txt < prev    next >
Encoding:
Text File  |  1996-07-25  |  2.4 KB  |  62 lines

  1.     id m0u4UeX-0007rNC; Wed, 3 Apr 96 08:39 MST
  2. Received: from cnc087032.concentric.net (cnc087032.concentric.net [206.173.132.32]) by franklin-fddi.cris.com (8.7.1/(96/04/02 2.25)) id KAA00688; Wed, 3 Apr 1996 10:39:08 -0500 (EST)
  3. Mime-version: 1.0
  4. Message-id: <199604031539.KAA00688@franklin-fddi.cris.com>
  5. Subject: Re: disk images
  6. X-mailer: <PC Eudora Version 1.4>
  7. Content-type: text/plain; charset="us-ascii"
  8. To: Matt `The Man` Galgoci <mjgalgoc@unity.ncsu.edu>, executor@ftp.ardi.com
  9. Date: Wed, 3 Apr 1996 10:39:08 -0500 (EST)
  10. X-sender: johnhess@pop3.cris.com
  11. From: johnhess@cris.com (John Hess)
  12. Sender: owner-executor@ardi.com
  13. Precedence: bulk
  14.  
  15. :At 04:14 PM 4/2/96 -0500, Matt `The Man` Galgoci wrote:
  16. :Hi-
  17. :    I realize that in order to use a disk image as a hfv, the first 
  18. :84 bytes must be stripped off the beginning and the image renamed using 
  19. :*.hfv convention.  Right now, with DOS, I'm not aware of any methods 
  20. :that I can use to do this.  (Yes, I do know how to rename files :-))
  21. :Could a Hex editor be used? How about any of the Norton Utilities?
  22. :- 
  23. :                     North Carolina State University
  24. :                            Matthew John Galgoci
  25. :                          mjgalgoc@unity.ncsu.edu
  26. ::>
  27. :
  28. My question is, how do I get the file to copy back to the DOS area so I CAN 
  29. edit it after I un-hqx/sit/sea it?  If you have the actual image file in 
  30. DOS, you should be able to strip the first 84 bits with the following BASIC 
  31. code.  Note that it is written free-hand on line.  As always when mucking 
  32. about with a file you want to keep, save it somewhere else before mucking 
  33. about with it.
  34.  
  35. 10  Open "filename.ext" for input as #1 
  36. 20  Open "newname.ext" for output as #2
  37. 30  x=1
  38. 40  while not eof(1)
  39. 50  a$=input$(1,1)
  40. 60  if x > 84 then print #2,a$
  41. 70  x=x+1
  42. 80  a$=""
  43. 90  wend
  44.  
  45. Line 10 opens the file to be stripped.  Note that filename.ext represents 
  46. that file's FULL filename
  47. Line 20 opens the file to write the stripped data to.  Again, the FULL filename
  48. Line 30 sets a variable to count the characters
  49. Line 40 sets up a loop that will repeat until the end of the file is reached.
  50. Line 50 gets the next byte in the file
  51. Line 60 discards the first 84 characters and copies the remainder to file 2
  52. Line 70 counts the character position
  53. Line 80 blanks the String variable (may not be necessary, just playing it safe
  54. Line 90 loops back to the line 40 check.
  55.  
  56. Hope this helps.
  57.  
  58.  
  59. John
  60.  
  61.  
  62.