How can I automatically run a python script, whenever a Word-File is added to a specific folder? This python script would need to work with the Word-File afterwards. My operating system is Windows.
Thanks for your help in advance.
Step 1: Open Task Scheduler Application on your Windows Machine. Step 2: Click on 'Create Basic Task…. ' in the Actions Tab. And give a suitable Name and Description of your task that you want to Automate and click on Next.
To run Python scripts with the python command, you need to open a command-line and type in the word python , or python3 if you have both versions, followed by the path to your script, just like this: $ python3 hello.py Hello World!
There are several ways to do this and also a special Python package for this
Watchdog Python script for Windows file system
https://pypi.python.org/pypi/watchdog
https://blog.philippklaus.de/2011/08/use-the-python-module-watchdog-to-monitor-directories-for-changes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With