// 1、创建文件夹
string command;
string defaultPath;
for (int i = 1; i < 100; i++)
{
sprintf(saveName, "\\result%d", i); // 命名result1...result10文件夹
defaultPath = saveName;//
command = "mkdir result" + defaultPath; // result文件夹下创建defaultPath文件夹
system(command.c_str());
}
// 2、删除文件夹
string Path;
for (int i = 1; i < 100; i++)
{
sprintf(saveName, "\\result%d", i); // 命名result1...result10文件夹
Path = saveName;//
command = "rd result" + Path;
system(command.c_str());
}