How to scan location a file

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
Galakrond
Posts: 26
Joined: 18 Dec 2022, 12:23

How to scan location a file

08 Apr 2023, 11:14

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.
WKen
Posts: 200
Joined: 21 Feb 2023, 00:01

Re: How to scan location a file

08 Apr 2023, 12:02

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"
User avatar
mikeyww
Posts: 27366
Joined: 09 Sep 2014, 18:38

Re: How to scan location a file

08 Apr 2023, 14:38

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

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: AccelAHK, Descolada, Draken and 40 guests