7-Zip Windows Utility

7-zip Windows utility is a compression software suitable for Microsoft systems, which allows us to use a simple and clean terminal, considering the possibility of saving the compressed archive directly to a shared folder or disk withoutto the need to connect it to the computer / server.

The use of 7-zip Windows, however, also jzip, can be considered very useful for scripts generated by programmers with the extension ".bat", who like to do things the old way and using the Microsoft planning utility inherent in the operating systems of the Redmond house.

You can use 7-Zip Windows on any computer, including computers from commercial organizations, and you do not need to register or pay.

The main features of 7-Zip Windows are the good value of compression exploiting the technique LZMA and LZMA2

The supported formats for compression and decompression are innumerable

    • Compression: 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM
    • Decompression: AR, ARJ, CAB, CHM, CPIO, CramFS, DMG, EXT, FAT, GPT, HFS, IHEX, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, QCOW2, RAR, RPM, SquashFS, UDF, UEFI, VDI, VHD, VMDK, WIM, XAR and Z

For ZIP and GZIP formats, 7-Zip Windows offers a better compression ratio than 2-10% compared to the report provided by PKZip and WinZip, strong AES-256 encryption, self-extracting capability, integration with Windows Shell (use from terminal), a powerful file manager and a powerful command line version without forgetting the possibility of use in well 87 different languages.

Here is the list of useful commands for using 7-Zip Windows

Usage: 7z <command> [<switches> ...] <archive_name> [<file_names> ...]

[<@ Listfiles ...>]

<Commands>

a: Add files to archive

b: Benchmark

d: Delete files from archive

e: Extract files from archive (without using directory names)

h: Calculate hash values ​​for files

l: List contents of archive

t: Test integrity of archive

u: Update files to archive

x: eXtract files with full paths

<Switches>

-ai [r [- | 0]] {@ listfile |! wildcard}: Includes archives

-ax [r [- | 0]] {@ listfile |! wildcard}: eXclude archives

-bd: Disable percentage indicator

-i [r [- | 0]] {@ listfile |! wildcard}: Includes filenames

-m {Parameters}: set compression Method

-o {Directory}: set Output directory

-p {Password}: set Password

-r [- | 0]: Recurse subdirectories

-scs {UTF-8 | WIN | DOS}: set charset for list files

-sfx [{name}]: Create SFX archive

-si [{name}]: read data from stdin

-slt: show technical information for l (List) command

-so: write data to stdout

-ssc [-]: set sensitive case mode

-ssw: compress shared files

-t {Type}: Set type of archive

-u [-] [p #] [q #] [r #] [x #] [y #] [z #] [! newArchiveName]: Update options

-v {Size} [b | k | m | g]: Create volumes

-w [{path}]: assign Work directory. Empty path means to temporary directory

-x [r [- | 0]]] {@ listfile |! wildcard}: eXclude filenames

-y: assume Yes on all queries

And here's a simple example for using 7-zip Windows with your scripts that will allow you to keep the latest 7 backups by erasing the previous ones and quickly dating the compressed file name.

An example that also allows you to understand how to behave in the presence of a network folder / disk, without the need to associate it with the computer / server,

Echo off

if% time: ~ 0,2% leq 9 (set filedest =% date: ~ 6,4 %% date: ~ 3,2 %% date: ~ 0,2% _0% time: ~ 1,1 %% time: ~ 3,2%) else (set filedest = % date: ~ %% ​​date 6,4: 3,2 ~ %% ​​date: ~ 0,2% _% time: ~ %% ​​time 0,2: 3,2% ~)

Net stop FirebirdServerEasyfatt

"C: \ program files \" 7-Zip \ 7z.exe to -t7z \\ 10.10.0.10 \ BCKDATI \ bckdaneazip \ DaneaEasyFatt_% filedest% .zip "e: \ Danea Easyfatt Enterprise"

Forfiles / p \\ 10.10.0.10 \ BCKDATI \ bckdaneazip / s / m DaneaEasy *. * / D -7 / c "cmd / c of / q @path"

Net start FirebirdServerEasyfatt

The old system operators, still use and prefer Dos scripts without special utilities, but focusing on the result obtained and on the performances, undoubtedly better, given the use of what Microsoft makes available to its customers.

Back Blog IT