如何在rtorrent中读取文件,将值设置为自定义目录?

时间:2015-03-11 04:09:16

标签: xml-rpc bittorrent libtorrent

我正在尝试获取txt文件的内容,并将该内容设置为rtorrent的自定义移动目录。这是我在rtorrent.rc中的内容:

system.method.insert = d.get_loaded_basename,string|simple,"execute_capture=bash,-c,\"cat /files/id.txt\",cleanbase,$d.get_loaded_file="

# insert another method to concatenate the final destination directory with the basename
system.method.insert = d.get_meta_path,simple,"cat=/files/complete/,$d.get_loaded_basename="

#watch and set custom path
schedule = watch_1,15,15,"load_start=/files/watch/*.torrent,d.set_custom1=$d.get_meta_path="

#move file to custom path and execute script
system.method.set_key = event.download.finished,move_complete,"d.set_directory=$d.set_custom1=;execute=mv,-u,$d.get_base_path=,$d.set_custom1=;execute=/files/script.sh {pass ID#}"

id.txt文件有一个数字,例如123.因此,对于这种情况,文件应该移动到/ files / complete / 123 /。 id.txt中的数字会有所不同。另外,我想将ID号作为参数传递给script.sh。我怎样才能做到这一点?

0 个答案:

没有答案