-   Linux - Newbie (
-   -   Rename file to parent directory name (

ExWizzard 12-11-2009 03:37 PM

Rename file to parent directory name
Alright , basically im running rtorrent client and i have a task in rtorrent to auto extract any downloaded torrent that is packed in rar.


system.method.set_key =,unrar_on_completion,"execute=unrar,e,$d.get_base_path=,~/downloads"
As you can see ,

I can execute shell commands.
Now the problem is that many of the extracted rar files have a badly formatted name which is bad for me. I would like to rename the extracted file to the name of the directory they were extracted from.
So i would execute a script that unrars and then renames.
Is this doable or am i asking too much?

rweaver 12-11-2009 03:54 PM

I'm a little unclear on what you're asking but, it's currently unraring the files and all you need it to do additionally is rename the directory? or is it not functioning presently and you want it to have a different behavior?

ExWizzard 12-11-2009 04:19 PM

Yes , its currently unraring and i want it to automatically change the name of the unrared file to match the name of the folder the file was in

All times are GMT -5. The time now is 10:59 PM.