简体   繁体   中英

How to extract a multi-volume RAR archive file with a Python script?

I want to do this on Linux with rar x filename .

The RAR archive file is split into parts, for example:

Filename-001.rar
Filename-002.rar
Filename-003.rar

I wanted to extract them all at once with a Python script.

I can think of three ways:

  • make a shell (such as bash ) script to do this. There are many ways to do this that you can find with a Google search, so I'm not going to link them and limit you to one.
  • use Python to run shell commands: look into os.system and "subprocesses"
  • many Python solutions here: How can unrar a file with python

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM