How do you supply a wildcard to something and then it returns a list of all files that match it? For example, I want to parse all *.txt files in a directory, how would I go about doing that? In other languages it's been FindFirst and FindNext
Printable View
How do you supply a wildcard to something and then it returns a list of all files that match it? For example, I want to parse all *.txt files in a directory, how would I go about doing that? In other languages it's been FindFirst and FindNext
The method of doing this is operating system dependent: the C and C++ standards do not define this sort of functionality.
If you're under windows, the functions in the win32 SDK are FindFirstFile() and FindNextFile(), which are declared in the (windows specific) header <winbase.h>. On other operating systems, the function names are different.
<fake excitement>
I know this, I know this!!!!!
<bored again>
http://faq.cprogramming.com/cgi-bin/...&id=1044780608