Does Windows 7 have unzip at the command line installed by default?

14

1

There is a zip/unzip option in the context menu so is it accessible from the command line?

asksuperuser

Posted 2010-06-06T18:35:28.683

Reputation:

Answers

26

Yes and no.

The yes:

rundll32.exe zipfldr.dll,RouteTheCall filename.zip

would open the file in the explorer as a "compressed folder" similar to clicking open a zip folder

The no:

There is no other entry point in zipfldr.dll that allows decompressing files directly from command line. I would suggest using the 7zip command utilities or unzip.exe as these are free (as in freedom as well as in beer)

bubu

Posted 2010-06-06T18:35:28.683

Reputation: 9 283

4

If you already have Java JDK on your PC, and the bin directory is in your path (in most cases), you can use the command line:

C:\Program Files\Java\jdk1.7.0_45\bin>jar xf test.zip

Complete set of options for the jar tool available here.

Examples:

Extract jar file

jar x[v]f jarfile [inputfiles] [-Joption]
jar x[v] [inputfiles] [-Joption]

If you don't have JDK installed I would recommend installing 7-Zip, since it's very lightweight: http://www.7-zip.org/

Examples: http://www.dotnetperls.com/7-zip-examples

Source: https://stackoverflow.com/a/1021592/475876

Akira Yamamoto

Posted 2010-06-06T18:35:28.683

Reputation: 781

1Good suggestion! It's 3rd party package that probably exist on server and allows to avoid installing additional software that may cause additional security risks. – gavenkoa – 2017-05-31T07:25:31.790

1

Ethan Kuo

Posted 2010-06-06T18:35:28.683

Reputation: 11

1As the comments on the [SO] answer point out, this works only for .CAB files, not zip files. – Scott – 2017-02-09T07:02:15.157

Please read the question again carefully. Your answer does not answer the original question. – DavidPostill – 2017-02-09T10:38:42.760

sorry for my careless, my reply is for .CAB not for zip files. Thanks for correct. – Ethan Kuo – 2017-02-14T06:38:45.380

0

No it doesn't by default, but check here to do it anyway: http://stahlworks.com/dev/index.php?tool=zipunzip

BloodPhilia

Posted 2010-06-06T18:35:28.683

Reputation: 27 374