Running script after torrent finishes with multiple files
Posted: Wed Feb 02, 2011 11:41 am
I have this somewhat complex system set up which uploads the file after the torrent is done downloading. (and does other stuff before and after this whole process)
The script is like:
plowup "$TORRENT_FOLDER/$TORRENT_NAME" megaupload
something like that, I forgot the exact variable names, but that's what it looks like.
My question is: what happens if the torrent includes 2 files? Is there a while-loop that goes through the folder to see how many files there are and then fire the script for each file? I would test it but then i'd have to mod all my script files since i didn't build in a test-mode (i should've...). If I test it now, shit might go awry and mess up the system
So i'd like to know what happens 
Thanks!
The script is like:
plowup "$TORRENT_FOLDER/$TORRENT_NAME" megaupload
something like that, I forgot the exact variable names, but that's what it looks like.
My question is: what happens if the torrent includes 2 files? Is there a while-loop that goes through the folder to see how many files there are and then fire the script for each file? I would test it but then i'd have to mod all my script files since i didn't build in a test-mode (i should've...). If I test it now, shit might go awry and mess up the system


Thanks!