+ Reply to Thread
Results 1 to 2 of 2

Thread: How to create a directory with sub-directories?

  1. #1

    How to create a directory with sub-directories?

    How to create a directory with sub-directories?

  2. #2
    SHCreateDirectoryEx Shell API can work for you.

    It creates all the directories in the specified path.

    Example:

    Code:
    void CreateDirectoryWithSubDirectories(CString strPath)
    {
    	int nResult = SHCreateDirectoryEx(NULL, strPath, NULL) ;
    
    	if (nResult != ERROR_SUCCESS)
    	{
    		//error occurred.
    	}
    }
    Note:
    Do not forget to include #include <Shlwapi.h> header and Shlwapi.lib in input library list.

+ Reply to Thread

Bookmarks

Posting Permissions

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