set DRIVES=c d e f g h echo Scanning for perl.exe for %%d in %DRIVES% dir %%d:\ /s /b perl.exe |find /i "Perl.exe"