遍历文件夹
来源:互联网 发布:小米盒子破解版软件 编辑:程序博客网 时间:2024/04/27 16:58
BOOL EnumDllFiles(DWORD dwSetupID,CString FilePath,CString arry[],int length)
{
CString NextPath,tem,id;
CFileFind FileFind;
WIN32_FIND_DATA FindFileData={0};
HANDLE hFind=NULL;
BOOL bret=TRUE;
int len;
int a=strlen((LPCTSTR)FilePath);
if (!hFind)
{
tem=FilePath +"//*";
hFind=FindFirstFile((LPCTSTR)tem,&FindFileData);
}
if (!hFind)
return FALSE;
while (bret)
{
if(FindFileData.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)
{
if(!(strcmp(FindFileData.cFileName,".")==0||strcmp(FindFileData.cFileName,"..")==0))
{
NextPath=FilePath +"//"+FindFileData.cFileName;
EnumDllFiles(dwSetupID,NextPath,arry,length);
}
}
else
{
if (stricmp(FindFileData.cFileName,"pagefile.sys") !=0)
{
id=FilePath +"//"+FindFileData.cFileName;
len = id.GetLength();
if (len>4)
{
int nIndex = id.ReverseFind('.');
tem=id.Right(len-nIndex);
for (int i=0;i<length;i++)
{
if (tem.CompareNoCase(arry[i])==0)
{
//SetDlgItemText(IDC_STATIC_TITLE,"");
//SetDlgItemText(IDC_STATIC_TITLE,id);
InsertProgItem(dwSetupID,id);
break;
}
}
}
}
}
bret=FindNextFile(hFind,&FindFileData);
}
FindClose(hFind);
return TRUE;
}
- 遍历文件夹
- 遍历文件夹
- 遍历文件夹
- 遍历文件夹
- 遍历文件夹
- 文件夹遍历
- 遍历文件夹
- 遍历文件夹
- 遍历文件夹
- 遍历文件夹
- 遍历文件夹
- 遍历文件夹
- 遍历文件夹
- 文件夹遍历
- 遍历文件夹
- 遍历文件夹
- 文件夹遍历
- 遍历文件夹
- Ext_多行文本输入框_Ext.form.TextArea
- 创业投资——风险投资周期及股市趋势技术分析
- c++ using nameace 详解
- U盘安装ubuntu
- 不要忘记报名
- 遍历文件夹
- what is the difference between const int*, const int * const, int const *
- Ubuntu常用命令与技巧 转载
- Ext_数字输入框_Ext.form.NumberField
- Ext_单选框和复选框_Ext.form.Radio和Ext.form.Checkbox
- 二分查找算法
- GLib学习笔记(3)
- 获取可执行文件版本号(装载)
- MySQL数据库中的Date,DateTime和TimeStamp类型