正规的文件搜索方法,是Findfirst,然后用循环Findnext直到末端。此方法在功能上没有问题,处理文件数在1万之内的目录,问题不大,但是如果文件数高达数万以上,速度就很慢,搜索系统的Windows目录(win10),可长达数分钟。
为解决以上问题,可以尝试以下两种方法:
1、可以尝试使用多线程(本人未验证);
2、可以调用cmd.exe的dir,输出到文本文档,再从中二次搜索。
以上
欢迎交流~
正规的文件搜索方法,是Findfirst,然后用循环Findnext直到末端。此方法在功能上没有问题,处理文件数在1万之内的目录,问题不大,但是如果文件数高达数万以上,速度就很慢,搜索系统的Windows目录(win10),可长达数分钟。
为解决以上问题,可以尝试以下两种方法:
1、可以尝试使用多线程(本人未验证);
2、可以调用cmd.exe的dir,输出到文本文档,再从中二次搜索。
以上
欢迎交流~