DO NOT RUN ON COMIC THAT STARTS WITH Z. Thought someone else would like this.
Code: Select all
REM @ECHO OFF REM Based on REM Mass Zip, RAR to 7Zip Recompression Batch File by Andrew Armstrong REM http://aarmstrong.org/tutorials/mass-zip-rar-to-7zip-recompression-batch-file REM REM Find all .cbr and .rar files in the current directory, recompress them into .cb7 and .7zip files - deletes original ECHO Searching for CBR CBZ and RAR files to recompress into CB7 (Comic Book Zip) archives. for %%F in (*.cbr *.rar *.cbz) do ( ECHO Found %%F to recompress... REM Extract... "C:\Program Files\7-zip\7z" x "%%F" -o"%%F contents" REM Does the directory exist? has 7zip created it correctly? IF EXIST "%%F contents" ( REM Change directory, create zip of contents of directory... REM Deletes original file DEL /F "%%F" CD "%%F contents" REM for /f "delims=" %%i in ('dir /ad/s/b') do echo %%i REM remove banners DEL /F /S /Q z*.* REM Delete Thumbnail files. DEL /F /S /Q Thumbs.db REM compression level is 9 ultra "C:\Program Files\7-zip\7z" a -t7z "../%%~nF.cb7" * -mx9 CD .. REM Delete the temporary extraction folder RMDIR "%%F contents" /S /Q ECHO Recompressed %%F to %%~nF.cb7 ) ) ECHO Search ended. PAUSE CLS EXIT