0

First of all I will show example to you.

  1. I have another python files from each directories as below.(cannot move cause of python file work with each directory).
  • A.py from C:/User/xxx/A_folder
  • B.py from C:/User/xxx/B_folder
  • C.py from C:/User/xxx/C_folder
  1. And I have 1 folder for keep data.
  • C:/User/xxx/Data_Folder
  1. So I want to run each python file when Data_Folder is changed (only add new file).
  • If C:/User/xxx/Data_Folder add 1A.mp4. It will run A.py
  • If C:/User/xxx/Data_Folder add 2B.mp4. It will run B.py
  • If C:/User/xxx/Data_Folder add 3C.mp4. It will run C.py

for Data_Folder should be autorun standby waiting for file is add to Data_Folder.

Please support me and If you have any information please tell me. Thank you so much for any support.

Kukkik
  • 101
  • 8
  • With the "watchdog" tag, do you mean specifically that you want to use [this library](https://pypi.org/project/watchdog/) to write Python code that is on "autorun standby waiting for file"? Because if you just want a program that can check for file system changes and run your Python code, then a) we don't do tool/library recommendations here; b) whatever program you find will have its own documentation, and using it will not be a programming question; c) it would probably *not care* that your own code is written in Python, and just run whatever you give it. – Karl Knechtel May 25 '22 at 01:24
  • If you *do* mean that library, then does https://stackoverflow.com/questions/11883336/detect-file-creation-with-watchdog answer your question? – Karl Knechtel May 25 '22 at 01:25
  • @KarlKnechtel I don't specifically use only watchdog. you can use another. I just tag because I know watchdog can support monitoring file in folder – Kukkik May 25 '22 at 01:32
  • If you don't have a specific technology in mind, then you don't have a specific enough question for Stack Overflow yet. If you know of some options, then [try reading their documentation](https://meta.stackoverflow.com/questions/261592) and see if any of them make it obvious how to complete the task. – Karl Knechtel May 25 '22 at 01:35

0 Answers0