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

后端 未结 14 2278
南笙
南笙 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:49

    7-zip has not such an option. Plus the lines printed at each file compressed are supposed to display at the same spot without newline, erasing the previous one, which has a cool effect. Unfortunatly, in some contexts (Jenkins...) it produced several lines ☹️ flooding the console.

    NUL (windows) is maybe one solution.

    7-zip.exe -o some_dir x some_archive.7z>NUL
    

提交回复
热议问题