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

后端 未结 14 2532
南笙
南笙 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-07 00:16

    Examining 7zip source I found hidden -ba switch that seems to do the trick. Unfortunately it is not finished. I managed to make it work with several modifications of sources but it's just a hack. If someone's interested, the option variable is called options.EnableHeaders and changes are required in CPP/7zip/UI/Console/Main.cpp file. Alternatively you can poke 7Zip's author to finish the feature in tracker. There are several requests on this and one of them is here.

提交回复
热议问题