如何枚举所有* .exes及其详细信息?
时间:2020-03-06 14:35:45 来源:igfitidea点击:
就像是:
//Get all search data $search = new search('C:\', '*.exe'); while($item = $search->next()) { $details = $item->getDetails(); append_details('C:\files.txt', implode_details($details)); }
但是在NSIS(http://nsis.sourceforge.net/)中
解决方案
我们可以使用FindFirst / FindNext函数遍历特定目录中的所有内容。
FindFirst ##代码## "c:\*.exe" FileLoop: StrCmp "" DoneFileLoop ;Check for no files DetailPrint ;Print file name ;Code to output whatever details you wanted to a txt file here FindNext ##代码## ;Get the next file from the list goto FileLoop ;Go back to the top and check for no files DoneFileLoop: