Text File: Returning To Beginning?

P

PeteCresswell

Got a handle to a text file - passed from a calling routine.

The handle has read activity against it (e.g. "Line Input
#theFileHandle, myLine) performed by other routines.

I want to go back to the beginning of the file and copy everything
except the header and trailer records to a new file.

I guess the no-brainer is to open the already-open file again under
another handle - in which case I would know that I am at the first
record.

Is there a more straightforward way?

i.e. Can I issue a command like ".Position" or ".MoveFirst" against
the existing file handle?
 
P

PeteCresswell

Is there a more straightforward way?

I withdraw the question.

Was keeping an array of text file info and it *seemed* like a good
idea to keep the file handles in it.

Seems to me like I was trying to fool Mother Nature...... So I changed
over to just storing the complete path and re-opening the file each
time I need it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top