Jump to content
  • Advertisement

Archived

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

scottdewald

Find All Files in a Directory

This topic is 5499 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

Does anyone know how to find all the files in a Windows directory using c++. I know there is a MFC class class CFileFind that will let you doe this, but I am creating a game using OpenGL and it will not let me #include <afx.h> b/c it says that has already been included. I want to have a directory called [Maps], and then get all the maps that are in that directory. Thanks, Scott

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by scottdewald
Does anyone know how to find all the files in a Windows directory using c++. I know there is a MFC class class CFileFind that will let you doe this, but I am creating a game using OpenGL and it will not let me #include <afx.h> b/c it says that has already been included. I want to have a directory called [Maps], and then get all the maps that are in that directory.

Thanks,

Scott


Look up the functions, FindFirstFile, and FindNextFile, this is what you would use for finding files.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!