关于txt文档关键字搜索

时间:2018-03-19 16:14:20
【文件属性】:
文件名称:关于txt文档关键字搜索
文件大小:8KB
文件格式:TXT
更新时间:2018-03-19 16:14:20
txt文档 关键字 搜索 vc中如何查找指定目录如D: Program Files目录下是否有某个文件夹如MyGame 只要找到是否有MyGame这个文件夹就好了 不需要查找内部文件 我现在想做的主要是在C盘和D盘的Program Files文件夹下查找是否有MyGame这个文件夹 还要另外查找C盘和D盘中是否有“我的文档”这个文件夹 并在我的文档中查找是否有MyGame这个文件夹 请问这个要怎么实现呢 ######## void FindFile LPCTSTR pstr { CFileFind finder; build a string with wildcards CString strWildcard pstr ; strWildcard + T " " ; start working for files BOOL bWorking finder FindFile strWildcard ; while bWorking&&bRun { bWorking finder FindNextFile ; skip and files; otherwise we"d recur infinitely if finder IsDots continue; if it"s a directory recursively search it CString strFile finder GetFilePath ; if finder IsDirectory { if strFile Find "MyGame" >0 { AfxMessageBox "找到了" ; break; } else FindFile strFile ; } } finder Close ; }">vc中如何查找指定目录如D: Program Files目录下是否有某个文件夹如MyGame 只要找到是否有MyGame这个文件夹就好了 不需要查找内部文件 我现在想做的主要是在C盘和D盘的Program Files文件夹下查找是否有MyGame这个文件夹 还要另外查 [更多]

网友评论