home *** CD-ROM | disk | FTP | other *** search
- id m0u4Ufi-0007rLa; Wed, 3 Apr 96 08:40 MST
- Sender: owner-executor
- Received: by ftp.ardi.com (Smail3.1.29.1 #3)
- id m0u4UeX-0007rNC; Wed, 3 Apr 96 08:39 MST
- 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)
- Mime-version: 1.0
- Message-id: <199604031539.KAA00688@franklin-fddi.cris.com>
- Subject: Re: disk images
- X-mailer: <PC Eudora Version 1.4>
- Content-type: text/plain; charset="us-ascii"
- To: Matt `The Man` Galgoci <mjgalgoc@unity.ncsu.edu>, executor@ftp.ardi.com
- Date: Wed, 3 Apr 1996 10:39:08 -0500 (EST)
- X-sender: johnhess@pop3.cris.com
- From: johnhess@cris.com (John Hess)
- Sender: owner-executor@ardi.com
- Precedence: bulk
-
- :At 04:14 PM 4/2/96 -0500, Matt `The Man` Galgoci wrote:
- :Hi-
- : I realize that in order to use a disk image as a hfv, the first
- :84 bytes must be stripped off the beginning and the image renamed using
- :*.hfv convention. Right now, with DOS, I'm not aware of any methods
- :that I can use to do this. (Yes, I do know how to rename files :-))
- :Could a Hex editor be used? How about any of the Norton Utilities?
- :-
- : North Carolina State University
- : Matthew John Galgoci
- : mjgalgoc@unity.ncsu.edu
- ::>
- :
- My question is, how do I get the file to copy back to the DOS area so I CAN
- edit it after I un-hqx/sit/sea it? If you have the actual image file in
- DOS, you should be able to strip the first 84 bits with the following BASIC
- code. Note that it is written free-hand on line. As always when mucking
- about with a file you want to keep, save it somewhere else before mucking
- about with it.
-
- 10 Open "filename.ext" for input as #1
- 20 Open "newname.ext" for output as #2
- 30 x=1
- 40 while not eof(1)
- 50 a$=input$(1,1)
- 60 if x > 84 then print #2,a$
- 70 x=x+1
- 80 a$=""
- 90 wend
-
- Line 10 opens the file to be stripped. Note that filename.ext represents
- that file's FULL filename
- Line 20 opens the file to write the stripped data to. Again, the FULL filename
- Line 30 sets a variable to count the characters
- Line 40 sets up a loop that will repeat until the end of the file is reached.
- Line 50 gets the next byte in the file
- Line 60 discards the first 84 characters and copies the remainder to file 2
- Line 70 counts the character position
- Line 80 blanks the String variable (may not be necessary, just playing it safe
- Line 90 loops back to the line 40 check.
-
- Hope this helps.
-
-
- John
-
-
-