Page 1 of 1

scanning folders for new files

Posted: 19 Jun 2021, 17:30
by Getarealkite
is there a way to scan a specified folder for new files with little overhead processing. (i.e not poll it constantly but use a flag method)

I know there is #IfFileExist but that looks for a specific file . I guess I could compare a lookup table to see if a file was created biased on date created. but is there a way to create sort of an interrupt instead of polling constantly?

actually simpler way to ask this . are there interrupt flags that AHK can monitor when creating new file and from what source?

Im just brain storming so i dont have any example code.

scenario would be , download file. if goes to its specified folder. then autohotkey would detect it and move it biased on URL origin or just the filename.

has anyone attempted something like this ?

Re: scanning folders for new files

Posted: 19 Jun 2021, 17:36
by gregster
Have a look at Watchfolder().