ci2own Posted February 24, 2017 Posted February 24, 2017 I have multiple folders like this with files inside and i would like to know how could i batch compress all files inside folders in a 7z of the same name as the folder. 1Xtreme (USA) 1Xtreme (USA) (Track 01).bin 1Xtreme (USA) (Track 02).bin etc. 2Xtreme (USA) 2Xtreme (USA) (Track 01).bin 2Xtreme (USA) (Track 02).bin etc. 3D Baseball (USA) 3D Baseball (USA) (Track 01).bin 3D Baseball (USA) (Track 02).bin etc.
ci2own Posted February 24, 2017 Author Posted February 24, 2017 13 minutes ago, ci2own said: I have multiple folders like this with files inside and i would like to know how could i batch compress all files inside folders in a 7z of the same name as the folder. 1Xtreme (USA) 1Xtreme (USA) (Track 01).bin 1Xtreme (USA) (Track 02).bin etc. 2Xtreme (USA) 2Xtreme (USA) (Track 01).bin 2Xtreme (USA) (Track 02).bin etc. 3D Baseball (USA) 3D Baseball (USA) (Track 01).bin 3D Baseball (USA) (Track 02).bin etc. I found the answer! The used script is this one (Assuming 7z program is in C:\Program Files\7-Zip\7z.exe) and the script is on the root folder where are all folders with files inside: Just create a text with this script and rename it to script.bat (For example). And exec it! Hope it helps! for /D %%I in ("*") do ( pushd "%%~fI" "%ProgramFiles%\7-Zip\7z.exe" a -t7z -m0=LZMA2 -mx=5 -mmt=ON "%%~dpnxI.7z" ".\*" popd )
badboo Posted February 24, 2017 Posted February 24, 2017 Awesome!! I have some rom sets like this and I was thinking of zipping them with a batch, but didn't know how to create one. Now I am good to go. Gracias!!!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.