How to show extraction progress of 7zip inside cmd?

5

1

7z.exe do not show any extraction progress in cmd."C:\Program Files\7-Zip\7zG.exe" -y x -pPASSWORD "D:\Myfile.rar" Extracts the file with a GUI progress-bar. But I don't want a GUI progress bar. I want to show the progress in terms of percentage inside cmd. i.e, I want to use 7z.exe instead of 7zG.exe with percentage progress shown.

Deb

Posted 2014-01-15T17:26:10.323

Reputation: 209

Answers

5

There is (currently) no way to display a native progress bar at the command line. There are a lot of (dirty) hacks out there, from counting the extracted files while extracting to continously getting the size of the extracted file or directory. I would not recommend those - if you can, use the gui. If not, just let it happen :-)

bjoster

Posted 2014-01-15T17:26:10.323

Reputation: 297

@Deb: That's interesting, since you would think that in that vein, the developers would add a "silent" option, but they don't.

– palswim – 2017-05-10T05:15:38.153

17zip developer team has opinion that, they have disabled this feature for faster extraction.. They could have provide a switch atleast that can enable the progress bar.. However, what to do above their thoughts! – Deb – 2014-01-15T19:42:50.703

0

I have been about to get progress information using 7z.exe version with the command line:

7z.exe a archive.7z c:\testfolder -r -bsp2

Greg Chao

Posted 2014-01-15T17:26:10.323

Reputation: 1

-1

The standard 32 and 64 bit '7-zip Extra' application accepts command line input and provides a percentage complete indicator, however I should note that this does not happen within the active CMD window, it does start its own application window, although once complete will close itself and your script will carry on as per usual.

  1. Download the below source files from here: http://www.7-zip.org/download.html

    DESCRIPTION: 7-Zip Extra: standalone console version, 7z DLL, Plugin for Far Manager

  2. Retrieve the 7za.exe, 7za.dll, and 7zxa.dll files (I suggest only using the 32 bit files sitting outside of the x64 folder as they work on both architectures where x64 does not).

  3. Place these files in the same folder somewhere within your payload, or in an accessible location from your script and where the user running the script has rights to access both files.
  4. Refer to the 7-zip.chm for the command line and syntax information to create your script (this is not included in the download, and can be found in the standard install Program Files after installation), or refer to this very basic and helpful site: https://sevenzip.osdn.jp/chm/cmdline

Random206

Posted 2014-01-15T17:26:10.323

Reputation: 101