Hi, i am really new to this whole scripting thing, but what i am wanting to do is run a script that just copies the downloaded file to another directory (not move). Sorry if this seems a little silly, but i cant seem to find a good how to for someone as new as myself.
Thanks
Help with torrent end script
Re: Help with torrent end script
well, doing this with shell script would be better and easier, but here's python script to do that
you have to change the variable on line 7 to the location that you need to move the files to, and this script won't wrok on Windows but modifying it for Windows would be easy.
and again, you can do this using one line with shell script.
Code: Select all
#!/usr/bin/env python
from os import system, environ
from sys import exit
from os.path import join
to_dic = "CHANGE ME TO THE DESIRED LOCATION" # e.g /Users/me/Movies
tName = environ['TR_TORRENT_NAME']
tDir = environ['TR_TORRENT_DIR']
fullDir = join(tDir, tName)
command = "cp -r " + fullDir + ' ' + to_dic
system(command)
exit(0)
and again, you can do this using one line with shell script.