建立多層次目錄
Create a directory structure
void CreateDir(char* Path)
{
char DirName[256];
char* p = Path;
char* q = DirName;
while(*p)
{
if (('\' == *p) || ('/' == *p))
{
if (':' != *(p-1))
{
CreateDirectory(DirName, NULL);
}
}
*q++ = *p++;
*q = '';
}
CreateDirectory(DirName, NULL);
}