Archived

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

amemorex

mkdir() problem!

Recommended Posts

im trying to use the mkdir function but i''ve hit a wall..it cant seem to create more than 1 folder at a time.. for instance, if i were to code: mkdir("c:/windows/desktop/folder1/"); that would work, but if i code mkdir("c:/windows/desktop/folder1/subfolder1/"); and the folder1 doesn''t exist, the function doesn''t work.. so how do i make mkdir automatically create every folder in the string?

Share this post


Link to post
Share on other sites
A for loop and strcat().

I don''t think there''s a way to do that with one call... In my experience most directory creation things can only create one subdir, not an entire tree, in one call.

Share this post


Link to post
Share on other sites