Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading file names from an external hard disk 1

Status
Not open for further replies.

Lloydone

Programmer
Jan 17, 2007
41
NZ
Can anyone give me a clue as to how to go about reading file names with a certain extention into an array via the read option.

Regards,
Lloyd
 
Actems: I would say, start a new thread so that more users might benefit from it. I would reenter my answer to it.

Xwb: if this is a free format fortran file, length of line would not matter (at least not at this length).

Actems again:
check the actual size of your file 'upas_test.bin'. There might be a pitfall that is very confusing. Opening a file in your program without the status='old' clause would cause a file with this name to be entered in your directory if it was not listed allready. If you check the content of your directory after the faulty execution of your prog you will see the entry in your directory and you might overlook its actual size indicating it has no content.

So


(1) Check on the size of the file in your directory and delete it if it is 0

(2) open your files you want to read from with status='old' or action='read' only to prevent the directory entry

(3) see what happens.


Norbert.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top