Как я могу перечислить все * .exes и детали о каждом? - PullRequest
2 голосов
/ 23 сентября 2008

Что-то вроде:

//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 Ответ

2 голосов
/ 09 января 2009

Вы можете использовать функции 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:
...