async watch directory for new files

Gene Heskett gheskett at shentel.net
Sat Apr 24 10:05:15 EDT 2021


On Friday 23 April 2021 17:31:40 Zoran wrote:

> Hi,
>
> I need to watch for new files in directory, and when it shows up, I
> should create async task with file's full path for it, and wait for
> new file.
>
> If anyone here used a library for such task, please share which one.
>
> Regards.

inotifywait contains several variations of a notifier, I use it rather 
heavly here to automate such goings on as my incoming e-mail.

The variation I use most is launched by a bash script, when then waits 
for its return with the name of the new file, that bash script then 
takes an action determined by the name that was returned.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>


More information about the Python-list mailing list