MLDonkey: file_completed_cmd
Sample: Download file
If you have explored MLDonkey’s settings, you would have realized that you could trigger a command/shell script upon torrent’s completion.
I’ve included (along with this post) a sample shell script that shifts torrents to another location on the DNS-323 upon completion. Do note that this is a sample and it could have errors.
file_completed_cmd should contain a value which points to the location of mv_torrents.sh. For example if the full path to mv_torrents.sh is /mnt/HD_a2/mv_torrents.sh then the value of file_completed_cmd should be
file_completed_cmd = “/mnt/HD_a2/mv_torrents.sh”
Thanks a million, this works great!!!
There is a little problem in my case. file_completed_cmd works, files are being moved to proper directory. But then downloaded torrents are waiting “to be committed” in a web-interface… Whe I restart mldonkey, it tries to download those files again and again… any suggestion, please ?
Jarek, the default settings (in files tab) auto commit the files after finish downloading. Perhaps you wish to try manually commiting the files and see if it is the commit procedure that is causing the re-download of files
Works great! Thank you
I’m trying to modify the scrept to leave files at least 12 hours in the shared folder
Trunks,
Wow! That modification would be great! Do share with us!
if [ -d "/mnt/HD_a2/mldonkey/incoming/files" ]; then
find /mnt/HD_a2/mldonkey/incoming/files -mmin +720 -maxdepth 1 -exec mv ‘{}’ ‘/mnt/HD_a2/Incoming’ \;
fi
if [ -d "/mnt/HD_a2/mldonkey/incoming/directories" ]; then
find /mnt/HD_a2/mldonkey/incoming/directories -mmin +720 -maxdepth 1 -exec mv ‘{}’ ‘/mnt/HD_a2/Incoming’ \;
fi
This is the last one, tested and working!
Trunks,
Thanks for the script! I would remove the earlier 2.