Sign in to follow this  
KuroiRiquid

Returning which files are in a folder.

Recommended Posts

I'm writing the functions to load a custom map in my game and I need to figure out how to have my program figure out which files are in a certain folder. I'm using C++ and writing exclusively for a windows system. I assume there are some functions in the windows API to do this but I have no idea which ones and I'm not haveing any luck at all finding information about how to do this online. Hopefully some of you out there can point me in the correct direction. Thanks in advance. (-^.^-)

Share this post


Link to post
Share on other sites
Quote:
Original post by bakery2k1
Win32. I suppose the more standard C++ way of doing things would be to use Boost filesystem.


dang, I should of used this.
Instead I made my own custom file management class using stat... ( and this happened not even a week ago )

Share this post


Link to post
Share on other sites
Here is a hack, not very usefull thought:

system("dir >> txt.txt");
fopen(f,"txt.txt");
fread(..);
fclose()


It is highly dependable but works, hehe.. As I said
it is a hack and unrealiable.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this