7-Zip is a free and open-source file archiver, a utility used to place groups of files within compressed containers known as “archives”. It is developed by Igor Pavlov and was first released in 1999. 7-Zip uses its own 7z archive format, but can read and write several other archive formats.


The following script look into all files (.bak) in a directory and create a zip file.

*.bak -> *.7z

set p1=%%~ni.7z
set p2=%%i
echo %p1%
echo %p2%

FOR %%i IN (*.bak) DO ..\..\7-Zip\7z.exe a -sdel -mx1 %p1% %p2%

Compression Ratio

33 GB -> 20 GB

1 GB -> 81 MB (5 min)

Last modified: November 16, 2021



Write a Reply or Comment