How can I scan the computer for a specific named file like ''hello.exe''?
And how can I automatically delete it if its location is found?
Thanks, best regards.
How to scan location a file
Re: How to scan location a file
For searching, the Everything tool can also be used as needed.
Code: Select all
RunWait "C:\Program Files\Everything\es.exe" " hello.exe -export-txt C:\Temp\esOutput.txt", , "Hide"
Re: How to scan location a file
Code: Select all
#Requires AutoHotkey v2.0
et := 'd:\Q\everything\es.exe'
fn := 'test230408.txt'
out := A_ScriptDir '\out.txt'
n := 0
RunWait et ' ' fn ' -export-txt ' out,, 'Hide'
Loop Read out
FileRecycle(A_LoopReadLine), n++
MsgBox 'Done!`n`nFiles: ' n, 'Success', 64