Jump to content

do I have any way to batch convert rar files into zip files?

12345678

So I got like hundreds of rar files, and opening them with 7zip then re compressing them in a zip format is not feasible

how can I do this?

Link to comment
Share on other sites

Link to post
Share on other sites

Is it not an option to batch unrar to their separate folders then batch zip those folders?

Link to comment
Share on other sites

Link to post
Share on other sites

A shell script with a for loop should do the trick?

 

Something along those lines:

for file IN *.rar
do
  fileNoExtension = "${file%.*}"

  echo "Extracting $file..."
  rar x $file.rar path
  
  echo "Compressing $file..."
  7z a $file.zip path
done

You'd have to figure out the correct arguments to use, so "path" isn't included in the new archive.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×