phpでファイル検索
PHPは、Macに標準でインストールされています。
Windowsの場合は、インストールすれば、使えます。http://windows.php.net/download#php-7.1
今回の検証では、「VC14 x86 Thread Safe (2017-Mar-16 00:40:42)」をインストールしました。
パスの記述を変更すれば、WinとMacで同じコードが利用できます。
target:PHP
※Macの場合、target:PHP
Winの場合、C:\Program Files (x86)\PHP\php.exe (先にPHPをインストールした場合)
Arguments:
-r "
foreach(glob('/Applications/*.*') as $file) {
$result[] = $file ;
}
print_r(implode (\"\n\",$result));
"
結果:
/Applications/App Store.app
/Applications/Automator.app
/Applications/Calculator.app
/Applications/Calendar.app
/Applications/Chess.app
/Applications/Contacts.app
.....