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

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