How to track file changes and copy modified files to another folder?
📁 List, Help, AI
The essence of the program: check files for the last modification, and if they have been modified, copy them to another folder.
So the problem is that I have a list of files obtained using the os.listdir(path) function. But its content is just text.
How can I bind the elements to real files?
PS from:
The previous modification date is stored in a list/dictionary. I want to check every 30 seconds whether the file has been modified.
I can suggest this option:
class SpriteManager(object): __instance = None @staticmethod def inst(): if SpriteManager.__instance == None: SpriteManager.__instance = SpriteManager() retu SpriteManager.__instance #single call check def __init__(self): print("Constructor called!")a = SpriteManager.inst()b = SpriteManager.inst() Log in to leave an answer
Blogs