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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Take files

Status
Not open for further replies.

sgueper

Programmer
May 2, 2002
18
ES

I would like to go to a directory and take all files like "*.000" to show and open them for reading line to line and I don't know how to do it.

Thanks

Silvia
 

Something like..?
------------------------------------
Dim CurFile as string, InFile as byte, InLine as string

CurFile= dir("c:\tmp\*.000")
while CurFile<>&quot;&quot;
infile=freefile
Open &quot;c:\tmp\&quot; & CurFile for input as #infile
while not eof(infile)
line inout #infile,inline
'code for each line here....
wend
close #infile
CurFile=dir
wend
------------------------------------
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Thank you very much, sunaj and sorry my english
 
Don't worry about your English. I suspect it's a LOT better than many of us trying to write in your language.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top