How to find directory name of a just downloaded folder

128 Views Asked by At

I use rtorrent on ubuntu that download folder with rar files inside.. And I want to automatically run a script that unrar, maketorrent and other things to that unrarred file. My question is.. How can i get the dirname of the directory just downloaded? It s always different so I cant use a Variable or something like that. For now, i am downloading everything to /X and extract /x/*.rar to /X2. But its a very ugly way because i have to always delete everything in /X before starting a new download or everything will mess up.

I actually have the name of the directory Which, using irssi, is stored in a variable $releasename, but thats another program, i dont think i can import it to python.. Or maybe Yes, i don't know..

0

There are 0 best solutions below