如何枚举所有* .exes以及每个* .exes的详细信息?

时间:2008-09-23 12:40:09

标签: search foreach nsis exe

类似的东西:

//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/

1 个答案:

答案 0 :(得分:2)

您可以使用FindFirst / FindNext函数遍历特定目录中的所有内容。

FindFirst $0 $1 "c:\*.exe"
FileLoop:

StrCmp $1 "" DoneFileLoop ;Check for no files
DetailPrint $1 ;Print file name

;Code to output whatever details you wanted to a txt file here

FindNext $0 $1 ;Get the next file from the list
goto FileLoop ;Go back to the top and check for no files

DoneFileLoop: