scanning folders for new files

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Getarealkite
Posts: 5
Joined: 30 Aug 2020, 14:46

scanning folders for new files

Post by Getarealkite » 19 Jun 2021, 17:30

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 ?
gregster
Posts: 8921
Joined: 30 Sep 2013, 06:48

Re: scanning folders for new files

Post by gregster » 19 Jun 2021, 17:36

Have a look at Watchfolder().
Post Reply

Return to “Ask for Help (v1)”