{
CFileFind ff
strMusicFolder += _T("\\")
局扒喊 strMusicFolder += _T("桐野*.*")
BOOL res = ff.FindFile(strMusicFolder)
此世while (res)
{
res = ff.FindNextFile()
if (!ff.IsDirectory() && !ff.IsDots())
{
afxMessageBox(ff.GetFilePath())
}
}
ff.Close()
}
用下面的程序段可以实现你要求的功能
CFileFind ff
CString strDir= "d:\\Program Files\\*.*"
BOOL res = ff.FindFile(strDir)
while(res)
{
res = ff.FindNextFile
if(ff.IsDirectory() &&(!ff.IsDots()))()//遍历子目培做敏录,剔除".0”和".."两配枝个
{
CString strFile = ff.GetFileName()
…
// 在这里写需要的代码
}
}
ff.Close()// 不要忘记胡顷关闭
若满意请及时采纳,谢谢
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)