Trying to rar file but encountering issues

Come up with a useful post-processing script? Share it here!
Post Reply
uniacid
Newbie
Newbie
Posts: 2
Joined: August 21st, 2010, 9:57 pm

Trying to rar file but encountering issues

Post by uniacid »

So I'm trying to rar a file after post processing but it seems to not be able to rar the filename because of spaces,

I've tried some different things and tried encapsulating the var in '' and "

ex: rar -m0 a $1.rar $1/

Basically trying to run this command and then if possible move the file to a desired local location,

Any help would be appreciated.
sweetie
Full Member
Full Member
Posts: 117
Joined: May 10th, 2009, 10:47 am

Re: Trying to rar file but encountering issues

Post by sweetie »

Code: Select all

cd "$1"; rar a "$3.rar" * -m0 && mv -fv "$3.rar" "/dest/in/ation"
You could replace the wildstar with: "$1", to retain the entire directory structure (from root.).
Last edited by sweetie on August 22nd, 2010, 9:27 am, edited 1 time in total.
uniacid
Newbie
Newbie
Posts: 2
Joined: August 21st, 2010, 9:57 pm

Re: Trying to rar file but encountering issues

Post by uniacid »

Thanks that did the trick!
Post Reply