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

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