tar syntax examples
command line compression
rar syntax examples
export backup job save job as script
convert task to command zip from command line create backup restore script
from gui to command

download rar utility

PeaZip is a free cross-platform file archiver that provides an unified portable GUI for many Open Source technologies like 7-Zip, FreeArc, PAQ, UPX...
Create 7Z, ARC, BZ2, GZ, *PAQ, PEA, QUAD/BALZ, TAR, UPX, WIM, XZ, ZIP files
Open and extract over 180 archive types: ACE, ARJ, CAB, DMG, ISO, LHA, RAR, UDF, ZIPX files and more...
Features of PeaZip includes extract, create and convert multiple archives at once, create self-extracting archives, split/join files, strong encryption with two factor authentication, encrypted password manager, secure deletion, find duplicate files, calculate hashes, export job definition as script on MS Windows and Linux systems.

free unrar software

generate script file from gui
file compression command

PeaZip command line syntax, scripts



zip from command line

PeaZip acts as a frontend for many Open Source archiving executables: due its frontend architecture most tasks possible to be accomplished with PeaZip GUI can be converted and exported to command line, and saved as script (batch file or shell script), using Save task definition button in Console tab (in archiving/conversion and in extraction interfaces), or rar command examples button in task's window.
From the Console tab the task can be modified and tested, before being saved.
Exporting GUI-defined jobs as script bridges the gap between GUI and command-line worlds, taking the best of both: users can benefit of those saved sample scripts (main menu Tools > Saved task definition scripts points to the default PeaZip's script directory) as examples or building blocks to speed up further scripting, or for learning purpose about the underlying executables (i.e. build examples for backend p7zip / 7-Zip command line syntax), or for fine-tuning the task beyond the GUI's capabilities.
Exported tasks are displayed as UTF8 text and can be freely saved, in example (but not only) as
Bash shell on Unix systems, or .bat or .ps1 PowerShell script on Microsoft Windows platform.

Microsoft Windows Vista and newer systems, Schedule tab (in archiving/conversion and extraction interfaces) is intended as a quick way to schedule (in builtin Windows system's Task scheduler) a scripted task defined in Console tab, i.e. to automate backup or restore job launching the saved script file(s) at user-defined times, or under specific circumstances / events.

Please note those command lines / scripts are targeted directly to backend archivers / compressors binaries (7-Zip / p7zip, unace, unrar, Pea, FreeArc...) so are useful for creating examples to understand and experiment the syntax of those tools.
PeaZip also supports its own command line syntax, in order to simplify the task of script creation, offering an unified set of commands to use underlying functions without having to explicitly use the syntax of backend binaries: this is the subject of following section.

One of the scopes of PeaZip project is offering a simple and homogeneous frontend command line interface to mask the complexity and the differences in CLI syntax of back-end executables, "converting" commands into simpler PeaZip's syntax mapping instructions for most common compression / extraction tasks.
Quick access to most used PeaZip’s functions is provided passing as first parameter a constant string value identifying the function; those methods can be used invoking PeaZip from scripts or also creating a link to PeaZip executable with the desired first parameter.


  • -add2archive: add to a new archive and open PeaZip GUI to set archive’s type and options;
    •   -add2archive-add as -add2archive, but add to existing archive (if found)
    •   -add2archive-update as previous, but update older files only
  • -add27z: add to a new .7z archive;
  • -add27zmail: add to a new .7z archive and attach it to a mail, requires compatible mail client like i.e. Outlook and Outlook Express
  • -add2separate7z: add each input to a separate new .7z archive;
  • -add2sfx7z: add to a new self extracting 7z archive (.exe);
  • -add2sfx7zmail: add to a new self extracting archive and attach it to a mail, requires compatible mail client like i.e. Outlook and Outlook Express
  • -add2zip: add to a new .zip archive;
  • -add2zipmail: add to a new .zip archive and attach it to a mail, requires compatible mail client like i.e. Outlook and Outlook Express
  • -add2separatezip: add each input to a separate new .zip archive;
  • -add2pea: add to a new .pea archive;
  • -add2crypt: add to a new encrypted .pea archive;
  • -add2split: raw split a single input file;
  • -add2wipe: securely delete selected file(s);
  • -add2compare: byte to byte compare two files;
  • -ext2browse: open (and browse if applicable) the archive(s) in PeaZip file/archive manager GUI;
  • -ext2browsepath: browse the selected folder (or its path, if a file is selected) in PeaZip;
  • -ext2main: open archive in "Archive extraction" interface, allowing to specify i/o options, password and keyfile (interactively);
  • -ext2here and -ext2folder: extract archive(s) to its own path, “folder” variant creates a new folder named after the archive;
  • -ext2to and -ext2tofolder: extract archive(s) interactively asking for output directory;
  • -ext2simple and -ext2simplefolder: simplified “blanket” extraction command for all backends, allows to specify output path as first parameter;
  • -ext2list: list archive(s) content, to quickly look what is in the archive;
  • -ext2test: test archive(s) content;
  • -ext2openpwtest requires password as paramstr(2) (always delimited) and archive’s full name as paramstr(3): try to list the archive and terminate with exit code 0 if archive is not encrypted, 1 if it is encrypted, 2 if it is non readable (corrupted or with encrypted file list), -1 if archive is not found.
  • -ext2commandprompt: open the command prompt in the selected folder (or in its path, if a file is selected)

  • -peazipreset: reset PeaZip configuration, as Options > Reset button; can resolve unexpected problems with configuration, restarting the application with factory settings
-add2archive, -ext2main and -ext2browse open the PeaZip GUI, to allow further user’s interaction

On MS Windows platforms PeaZip can also send multiple input to a single instance using semaphores and temporary files (temp files are deleted automatically but in case of any kind of problem there is a reset switch in Options > Settings first tab to remove any possible leftover), this allows the command verb to be used in static registry entries (i.e. in Windows systems context menu) to send multiple input to a single instance:
  • -add2multi works like -add2archive
  • -add2multi7z works like -add27z, but stays in the archiving interface until the user click "Ok" button; it can be modified in -add2multi7zfastest, *normal, or *ultra to directly set the compression to fastest, normal or ultra levels presets (the compression method used is the one defined by the user)
  • -add2multizip works like -add2zip, but stays in the archiving interface until the user click "Ok" button; likewise the previous switch it can be modified to *fastest, *normal, or *ultra compression level
  • -add2multisfx works like -add2sfx7z, but stays in the archiving interface until the user click "Ok" button
  • -ext2multi works like - ext2main
While the instance accepting files is open, it is possible to continue adding input from the same directory selecting objects and using context menu’s entry, as an alternative to dragging the object to the application window that might be less handy if the workspace is crowded.


  • peazip -add2zip file1 file2 directory3 will add specified objects (file1 and file2, and all content of directory3) to a .zip archive; using -add27z instead of -add2zip will perform the same task but will result in a .7z archive (-add2pea will result in a .pea archive, -add2sfx7z will result in an self extracting executable and so on).
  • peazip -ext2here archive1 will extract archive1 in its path; using -ext2folder archive1 will be extracted to a new folder named "archive1" in the same path of archive1 file
  • peazip -ext2simple archive1 somedirectory extract archive1 in "somedirectory" path

More information: batch file.bat file for Microsoft Windows and shell scriptunix shell commands Wikipedia definitions



Tag Cloud
apply encryption to archive files backup files & folders calculate checksum hash value command line compression convert existing archive files create backup script detect duplicate files download free zip software extract 7Z files extract ARC files extract RAR files extract ZIP files extraction of RAR TAR ZIP archives file split tool free file archiver free RAR utility handle GZ files open ACE files open CAB files open encrypted files open TAR files open WIM files open ZIPX files portable file archiver RAR file format rar command syntax secure data deletion tar syntax self extracting archives work with BZ2 files work with ISO files ZIP file format zip from command line

extract rar from command line
create zip from command line
All PeaZip downloads
PeaZip for Windows 32 bit
PeaZip for Windows 64 bit
PeaZip Portable
PeaZip Linux/BSD
rar extraction script
how to work with command line
Online help
Frequently Asked Questions
More information

work with scripts
create script file
Support PeaZip project, or donate to FAO, UNICEF and UNESCO from donation page

© PeaZip srl: TOS, Privacy
OSDN software repository
free rar downloads
SourceForge software repository
free rar
Releases Feed zipx files
PeaZip Wiki rar files
Developer email download rar software
Search knowledge-base
rar archiver