The title is pretty much self explanatory and my example makes it pretty obvious but I'm trying to find for a particular exe file and execute it.
cd c:\
for /f %%f in ('dir /b /s eclipse.exe') do (
start %%f -clean
)
echo Done!
pause >nul
For safety reason please let me know if it's possible to run only the first file found or look for a particular hash string or file size.
Thanks !
To run only the first file found (
"tokens=*"
to eliminate spaces in path(s); note also required empty string""
instart "" "%%f" -clean
)To look for file size
To look for a particular hash string: in
cmd
line need an external tool like File Checksum Integrity Verifier (FCIV) or better HashMyFiles etc.In Windows PowerShell:
Get-FileHash
computes the hash value for a file by using a specified hash algorithm.