#include <#include <stdio.h>
#include <#include <stdlib.h>
#include <#include <sys/stat.h>
char* strCat = (char*)malloc(200);
void main()
{
char folderName[] = "./image_dst"; //当前目录下的image_dst文件夹;
struct stat buffer;
int a = (stat(folderName, &buffer) == 0); //判断文件夹是否存在,不存在创建;
if (a==0)
{
_mkdir(folderName); //不存在则创建;
}
sprintf(strCat, "%s\\%s", folderName,gain); //当前目录下的gain(gain为变量)文件夹;
int b = (stat(strCat, &buffer) == 0); //判断文件夹是否存在,不存在创建;
if (b == 0)
{
_mkdir(strCat); //不存在则创建;
}
sprintf(strCat, "%s\\%s&%s", strCat, name_p, name_c);
int c = (stat(strCat, &buffer) == 0); //判断文件夹是否存在,不存在创建;
if (c == 0)
{
_mkdir(strCat); //不存在则创建;
}
free(strCat );
return;
}