9

Is there any tool in the Windows command line that allows me to do this? Otherwise, is there any light and portable application that will allow me to?

Related question, can I rename .bz2 extension to .zip? Seems to work for WinRar.

Hennes
  • 65,804
  • 7
  • 115
  • 169

4 Answers4

13

Windows doesn't have native support for .bz2. 7-zip however is free and pretty light as well as featuring command line running. The command you need for it is:

7z x archive.bz2
Andy
  • 774
2

The official bzip2 command line utility is available for Windows.

Installation:

  1. Download and unpack the file bzip2-1.x.x-win-x64.zip for a 64 bit Windows, or bzip2-1.x.x-win-x86.zip for a 32 bit Windows.

  2. Install msvcr120.dll according to the instructions:

    All binaries depend on the Visual Studio 2013 C Runtime Library (msvcr120.dll). This can be installed using the Visual C++ Redistributable Packages for Visual Studio 2013 installer.

tanius
  • 868
0

Adding on tanius's answer:

1.Download and unpack the file bzip2-1.x.x-win-x64.zip for a 64 bit Windows, or bzip2-1.x.x-win-x86.zip for a 32 bit Windows.

  1. Install msvcr120.dll for v 1.06 and vcruntime140.dll for newer versions according to the instructions

If you're like me and don't know anything about vcruntime140.dll, I found this video helpful in helping me find out where it is / how to get it.

0

If you happen to have Git for windows, this includes bzip2.exe (along with lots of other GNU tools from MINGW64).

You can use bzip2 directly via Git Bash, e.g. bzip2 -d my.bz2 (or bunzip2 my.bz2).

Alternatively, you can call the executable from windows cmd or powershell. You'll find it in your Git installation folder, e.g. %LOCALAPPDATA%\Programs\Git\mingw64\bin\bzip2.exe.

If you're looking to extract a .tar.bz2 file, calling tar -xf my.tar.bz2 from Git Bash will decompress the file automatically, because it knows where to find bzip2.

djvg
  • 256