Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

so I`m trying to do the following:

When rtorrent finishes download, it should copy files from download dir to another dir called uploads, so the file would be in Downloads dir AND in Uploads dir.

Before this I was using mv function to move file from Downloads to Uploads an here is a working example so you could understand rtorrents syntax:

system.method.set_key =,move_complete,"execute=mv,-u,$d.get_base_path=,~/uploads/"

This is working preview it executes "mv -u /home/downloads/folder1/ ~/uploads/, so basically it moves the torrent with the same name just to another dir.

The thing I do NOT get it how can I copy files (folders and files, depending on what Im downloading) with the same name, lets say:

/home/dl/harry potter/ ------> /home/ul/harry potter/

and next one could be

/home/dl/ubuntu.iso ------> /home/ul/ubuntu.iso

share|improve this question

Using the 'cp' command, e.g. "execute=cp,$d.get_base_path=,/home/ul/"

Though I don't know if '$d.get_base_path=' will be properly escaped in either case.

edit: Jeremy is right, you should add '-R' for recursive.
You should also add '-l' if dl/ and ul/ are on the same file-system, so that they are hard-linked.

share|improve this answer

Be sure to include the recursive flag ('-R') so that directories are properly copied: execute=cp,-R,$d.get_base_path=,/home/ul/

share|improve this answer
Hey Jeremy, thanks for the tip. Note that this is a Q&A site, not a discussion site. I think your comment is better posted as comment to somebody else's answer. Or you could flesh it out into a complete answer (and earn some reputation points). – Isaac Rabinovitch Nov 3 '12 at 2:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.