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

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