如何在所有驱动器中搜索文件 [英] how to search for a file in all drives
本文介绍了如何在所有驱动器中搜索文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嘿,我如何在HDD中搜索文件,
hey how can i search for a file in HDD ,
示例我想在我的计算机中搜索文件settings.ini.
example i wanna search for a file settings.ini in my computer .
推荐答案
First you have to get a list of valid drives. This was discussed previously on the StackOverflow.
您必须在每个驱动器的根文件夹上调用FindFirst/FindNext/FindClose.获取文件和目录的列表.检查文件列表.对每个目录重复此操作.直到目录用完为止.在StackOverflow上搜索"delfindfirst"以查找更多信息.
The you have to call FindFirst/FindNext/FindClose on the root folder of each drive. Get a list of files and directories. Check the list of files. Repeat this for each directory. Until you run out of directories. Search for "[delphi] findfirst" on StackOverflow to find more information.
这篇关于如何在所有驱动器中搜索文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文