Extracting a 7-Zip file “silently” - command line option

后端 未结 14 2281
南笙
南笙 2021-02-06 23:19

I want to extract a 7-Zip archive in a Python script. It works fine except that it spits out the extraction details (which is huge in my case).

Is there a way to avoid t

14条回答
  •  粉色の甜心
    2021-02-06 23:53

    If you're running 7-zip.exe from Powershell, and you only want to see errors, then you could try something like this:

    7-zip.exe u   | Select-String "Error" -Context 10
    

    This will only display the "Error" message line and the surrounding 10 lines (or whatever number) to capture the error specific output.

提交回复
热议问题