Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Peon

Obtaining file directory info

This topic is 5930 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

As I write the tools for my next game, its becoming apparent that I need to learn how to find out what files are in a certain directory. Actually, I don''t need the file structure of the whole computer or anything; just the "current" directory would be fine for my purposes. But anyway, if someone could post some code / examples / or just point me in the right direction to a post or function, I''d appreciate it! (not really sure what I need to look for...)

Share this post


Link to post
Share on other sites
Advertisement
FindFirstFile()
FindNextFile()

These will scan your directory (and any subdirectories) for a certain filename. The file name can include wild card characters.



I will not make a list of links... I will not make a list of links... I will not make a list of links...
Invader''s Realm

Share this post


Link to post
Share on other sites
Thanks, m8! I''ve always wondered how this could be done, and I''ve just dumped a listing of all the .txt files in the directory successfully into another file. Thanks a lot!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!