1. How do I return the length of an open binary file?
- Posted by Alan Tu <ATU5713 at COMPUSERVE.COM> Jun 19, 1998
- 559 views
How do I get the length of an open reading binary "rb" file returned? --Alan =
2. Re: How do I return the length of an open binary file?
- Posted by "Graeme." <hmi at POWERUP.COM.AU> Jun 20, 1998
- 524 views
At 04:12 PM 6/19/98 -0400, you wrote: > >How do I get the length of an open reading binary "rb" file returned? > >--Alan The easiest way is to seek() to the end of the file and then read the length with where(). i.e include file.e integer fn,junk,file_length fn=open(somepath,"rb") junk=seek(fn,-1) -- -1 for EOF file_length=where(fn) -- where an I? You will probably want to follow this with; junk=seek(fn,0) To start reading from the start of the file again. Graeme. ----------------------------------------------------