Avatar ·

How to track file changes and copy changed files to another folder?

📁 List, Help, AI

The essence of the program: check the files for the last change, and if they were changed, then we copy them to another folder.

So the problem is that I have a list of files obtained using the os.listdir(PATH) . But its contents, just text.

How can I tie the elements to real files?


ps from:

date of the previous change, preserved in the list/dictionary. I want to make sure that every 30 seconds it was checked whether the file has changed.