Creating deep directories
I'm trying to create a file for writing:
FILE *File = fopen( "C:\\some\\really\\deep\\directory\\blah.dat", "rb" );
The only problem is, none of these subdirectories exist, so fopen fails.
Is there a simple way to create all of these directories, when trying to
write a file?
Is there a general command to create deep directories that don't exist,
using just a single string of those sub-directories?
yeah, I can probably write up a hack to handle cases like this,
but I would rather use something that already does it if there is one.
Re: Creating deep directories
Quote:
Originally posted by Syslock
Is there a general command to create deep directories that don't exist,
using just a single string of those sub-directories?
Well...not to my knowledge...you have to do it one by one...
Re: Creating deep directories
SHCreateDirectoryEx might work for you...
Re: Re: Creating deep directories
Quote:
Originally posted by vicodin451
SHCreateDirectoryEx might work for you...
Cool....I guess I have to take a deeper look at the shell functions (which I tried to avoid for a long time)... :rolleyes: