Skip to content
Advertisement

Automatically and continuously copy files of a certain extension created in source folder and not present in output with Python

I have a program that creates .jpegs in a folder and deletes them after a very short time. I’d like to automatically copy those files to another folder as they are created and before they are deleted. I tried using robocopy but couldn’t manage. How can I do this with Python?

Advertisement

Answer

this script analyse your dir and move file if finded:

JavaScript

and this other is for copy file:

JavaScript

CTRL+C in your terminal for end script

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement