【问题标题】:How can I enumerate all *.exes and the details about each?如何枚举所有 *.exe 以及每个的详细信息?
【发布时间】:2010-09-12 08:29:06
【问题描述】:

类似:

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

【问题讨论】:

    标签: search foreach nsis exe


    【解决方案1】:

    您可以使用 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:
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-10-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-19
      • 2019-10-28
      • 1970-01-01
      相关资源
      最近更新 更多