5

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.

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 :-)

2
  • 1
    7zip 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
    Jan 15 '14 at 19:42
  • @Deb: That's interesting, since you would think that in that vein, the developers would add a "silent" option, but they don't.
    – palswim
    May 10 '17 at 5:15
1

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

-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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.