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

Loading file names into a txt file 1

Status
Not open for further replies.

Wings

Programmer
Feb 14, 2002
247
US
Hi,
I need to read through a folder filled with text files and load all the file names into another text file inorder to load them into a listview.

does anyone have any idea how to do this?

Thanks
 
1) You need to open a file to put the file names in. You can use FileOpen for this or your favorite file routine.

2) You will need to go through the files in the directory using FindFirst and FindNext.

3) For every file you find, put the file name into the file you created.

4) When done, use FindClose to free memory allocated by the find routines.

5) Load the file you created into the listview box.

Look at your help files for the file management routines.

If you get stuck, check back here. James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
 
Thanks for the help, it solved my problem
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top