Discussions
Categories
Groups
Advertisement
Child Item
Home
Topics
Technology & Internet
Software & Web Development
Development
Opening multiple files
Fergal20
Hi,
I have a folder that contains a number of files with the same extension eg, *.txt. I want my program to open all these files.
The program doesn't know the file names. I want the program to enter a loop and read in each file that has a specific extension.
Is it possible to do this? I am using MS VC++ 6. Would suit best if it could be done using fopen and fread.
Thanks in advance
Find more posts tagged with
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of
Advertisement
Advertisement
Comments
dazberry
You need to iterate thru' the directory first to get all the matching files. Look up
FindFirstFile
and related calls in the WinAPI help or MSDN. Once you have the filenames you can open them with whatever method you choose.
D.