Find knowledge base article(s) by searching for keywords in the title e.g. type linux in the search box below
Find knowledge base article(s) by browsing the subject categories of articles
Technology quick references, cheatsheets, user manuals etc.
Shop Online through ShopifyLite
Tutorials on various IT applications.
Search Title    (UL:0 |SS:f)

Software >> Applications >> Zip >> 7-zip >> How to use 7-zip (7z.exe) in a command line

 

To archive

Syntax:

7z.exe a –tzip <archivefilepath> <filestoarchivepath>
7z.exe a –t7z <archivefilepath> <filestoarchivepath>
7z.exe a –tgzip <archivefilepath> <filestoarchivepath>
 
Eg.
7z.exe a –tzip c:\data\abc.zip c:\data\logs\*.*
7z.exe a –tzip c:\data\abc.7z c:\data\logs\*.*
7z.exe a –tzip c:\data\abc.gz c:\data\logs\*.*

To Extract

Syntax

7z.exe e <archivefilepath>
7z.exe e <archivefilepath> -o<targetoutputdir>

Example

7z.exe e c:\data\abc.zip
7z.exe e c:\data\abc.7z
7z.exe e c:\data\abc.zip -oc:\data\logs
7z.exe e c:\data\abc.7z -oc:\data\logs

To List

Syntax

7z.exe l <archivefilepath>

Eg.

7z.exe l c:\data\abc.zip

 

 

[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]