S
S
sizova15082019-04-25 08:37:13
Python
sizova1508, 2019-04-25 08:37:13

How to run a script after creating a file/folder?

Good afternoon!
I have a python script. At the moment it works all the time, but I understand that this is not entirely correct, because it happens that it is simply idle for a while.
Is it possible to somehow run a python script after a certain file has been created in a folder?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Shitskov, 2019-04-25
@Zarom

works all the time, but I understand that this is not entirely correct

Seriously? Since when is a demon wrong?
Answer: https://superuser.com/questions/181517/how-to-exec...
Or for python
https://pypi.org/project/inotify/

R
Ruslan., 2019-04-25
@LaRN

Check out this article about monitoring file system events:
https://blog.magrathealabs.com/filesystem-events-m...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question