A lightweight Python tool that monitors a Windows download folder (such as a torrent directory) and automatically uploads completed files to a Linux server via SFTP.
It uses:
- Watchdog — detects new files in real time
- Paramiko — handles SFTP file transfer
- Monitors any folder for new files
- Automatically uploads files to a Linux server
- Runs continuously in the background
- Lightweight and easy to customize
Install dependencies:
pip install watchdog paramiko- path = "Your completed torrent file" # competed torrent folder to monitor
- hostname = 'put your ip' # Linux server IP
- username = 'put your username'" # SSH username
- password = 'the password for username' # SSH password
python main.pyThe script will monitor the folder and print messages like:
Monitoring
Found: vid.mp4
Now Uploading ..
upload complete-
Log events to a file instead of printing to console.
-
Use SSH keys instead of passwords for secure authentication.
-
Move or delete files locally after upload.
-
Add a configuration file (config.json).
-
Send notifications (Telegram/Discord) after upload.