2024-09-27 07:33:21 发布
网友
目前,我有一个大的压缩文件分裂成3个文件测试.zip,测试.z01,测试.zip02在
我使用python中的zipfile库来提取这些文件,但是遇到
error: "BadZipFile: Bad magic number for file header"
任何人都知道如何用Python提取这些文件。在
在python中调用7zip/winrar的命令行interfare可以解决这个问题
import subprocess unzip_command = '"C:\\Program Files\\7-Zip\\7z.exe"' + ' e ' + '"' + folder_path + '"' subprocess.run(unzip_command, shell = True, cwd = folder_path)
上面的代码将提取folder_path folder中的所有文件并将其存储在
在python中调用7zip/winrar的命令行interfare可以解决这个问题
上面的代码将提取folder_path folder中的所有文件并将其存储在
相关问题 更多 >
编程相关推荐