CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Threaded View

  1. #1
    Join Date
    Nov 2001
    Posts
    251

    Exclamation 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.
    Last edited by Syslock; December 18th, 2003 at 11:49 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured