I work with multiple archive files, mostly rar. I understand the basics of rar and zip. I'm looking for a way to decompress multiple rar files with a single command. Hopefully each file would be unrared into dir with same name as archive. I normally just do this manually, but sometimes I'm processing up to 30 or more files at a time. So a streamlining process would be helpful. Yesterday, in a Suse linux forum I saw a command that works great with zip:
Quote:
for i in *.zip
do
mkdir "${i/.zip}"
unzip -d "${i/.zip}" "$i"
done
I tried it out with some zip files. It works great, Creates individual dirs and unzips files into them. It processed 6 zip files in a few seconds. Manually it would have taken me several minutes.
However, I normally work with Rar files so I tried to adapt this command, but I can't get it right. This is what I used:
Quote:
for i in *.rar
do
mkdir "${i/.rar}"
unrar e "${i/.rar}" "$i"
done
It creates the directories but doesn't unrar files into them. I know I'm overlooking something very basic. But with my limited skills using the command line I've not found a working command. I'd appreciate some help.....