|
-
January 20th, 2003, 12:14 PM
#1
Reading in files without knowing the filenames beforehand?
Hi,
I have to write a program where I am given an input directory which will contain files with known extensions (e.g., *.exd, *.txt) but of which I do not know the beginnings of the names. Anyway, I have to be able to automatically detect all such files and then open them one by one. Can someone help me out how I can accomplish this? I know how to open a file when I know the entire name beforehand but have never had to do this before.
For example, lets say the directory contains the following files:
genseq001.txt
Data set 2.exd
Data set 2 jeff.exd
Data set 31 steve.exd
genseq002.txt
logref.txt
output.exf
output1.exf
So in this case, I have to be able to figure out that all these files are in the directory and then process them one by one except for the *.exf files.
Any help on what classes or commands I can use? I have to use standard C++ so it works on both Windows and Linux.
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|