How should I go about searching for different files in a directory, such as all files of one extension, without user input?
Thanks. Just one last question: with for_each_file_ex, is it possible to limit it to one directory, such as the same one as the .exe?
Yes. It doesn't recurse into subdirectories in the first place.
Ok. Thanks. So, to find .sav files in a folder named SAVES in the directory as my game, I would do this:
for_each_file_ex("SAVES//*.sav", ..., my_callback, ...);
?
for_each_file_ex("SAVES//*.sav", ..., my_callback, ...);
Yes, except that you would specify the directory as "SAVES/*.sav" (or under DOS/Windows "SAVES\*.sav").
Oh. Yeah, I use windows and forgot which way the slashes went.
Thanks for the help!
You might as well use /. It's more readable IMO because it doesn't require escaping, and it is cross-platform (unlike \).
'\\' is for windows. I don't think '/' works on windows though.
I don't think '/' works on windows though
Yes it does.