[Tutor] Monitoring directories

Alan Gauld alan.gauld at yahoo.co.uk
Fri Feb 14 03:11:52 EST 2020


On 14/02/2020 01:02, Nathan D'Elboux wrote:

> As this script is invoked currently via a cron job im not familiar
> with what i would need to do to make this python script monitor in
> daemon mode or how it would know  the newest files and the fact it
> haunt already copied them over.

Store the copied filenames in a file perhaps?
Either that or just store the time of the last run in a file. Then check
the file creation date against the last run time and if newer copy the file.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list