A particular script to convert .rar files into .zip files.
Sometimes I get files compressed in .rar WHY. But .rar is a limited file format to
work on the Linux. So I created a particular script on Bash that searches for
.rar files, uncompress them and re-compress into .zip format.
The detailed function of the script is:
- Search for .rar files
- Extract each one into a folder with the same name of the original file
- Compress each folder into a .zip file
- Install unrar
- Install unzip
This script was written by an amateur, so the things you need to do is:
- Install the requirements
- Put the script and the "exclude.tst" on to the directory where you want to execute
- Edit the "exclude.lst" as you like to exclude some items to compress
and if you need, edit the code too - Attribute the permission to the script to execute, like as
$ chmod +x rar2zip.sh
- Wait
- Check existing .zip files and add a folder inside if it doesn't exist a folder that includes the files
- Make the script more dynamic, e.g., set the path to execute the script