Jump to content
  • Advertisement

Archived

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

skiritis

ansi c file/directory question

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

i''m working on university project and i have a little problem. Well, i have to copy a folder and its contents in another folder. My problem is the follwing: it seems that i am not able to find how am i going to know what a floder contains in order to copy it to another location. So, i would like to know if there is any way of finding the content of a folder so that we could copy them or change the in any way. For example : Copy a random folder and all its contents to anther folder named "copy". what would you do for that?

Share this post


Link to post
Share on other sites
Advertisement
ANSI C has no functionality to iterate through directories. You''ll have to use an operating system specific set of functions to do so. If you''re on a *nix system look in the dirent.h header. If you''re on a Windows system, look up the FindFirstFile() function.

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!