Jump to content
  • Announcement

    The HyperSpin 2 early access beta is here!

    We’re starting the first public testing phase with Platinum Members to keep the scope manageable while we test the current feature set and begin to add more. In the future, we’ll provide a version for basic members as well.  On behalf of the entire HyperSpin team, we look forward to another exciting adventure with our community.

Batch compress files inside folders


ci2own

Recommended Posts

Posted

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.

 

 

 

 

Posted
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
)

Posted

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!!!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...