Page 1 of 1

Taking action when file is created?

Posted: 21 Jul 2018, 15:25
by DeBedenHasen
Hi.

In the built-in search in the command documentation, I couldn't find something like

Code: Select all

WhenFileCreated
The only thing I would have considered to have the action depend on

Code: Select all

Loop, Read...
I imagine that might slow the PC down in general as it's not very powerful.

Anyway, is there a way to have a script wait until a file exists, then execute any other command / action?
I hope so.

Thanks in advance.

Re: Taking action when file is created?

Posted: 21 Jul 2018, 15:34
by AHKStudent
if you are waiting for a file in a specific location you can use the if fileexist

Re: Taking action when file is created?

Posted: 21 Jul 2018, 15:39
by gregster
Yes, Fileexist can even work with file patterns... and I would rather use SetTimer than a loop.

There is also https://autohotkey.com/boards/viewtopic ... atchfolder