我有一个目录树,其结构如下所示:
-文件夹1
-------子文件夹1
----------------------拉链
-------子文件夹2
----------------------压缩的bzfile
-文件夹2
-------子文件夹1
----------------------压缩的bzfile
-------子文件夹2
----------------------压缩的bzfile
以此类推。。你知道吗
我的目标是解压缩文件夹1、2、3[…]和10的所有子目录的每个zipfile。你知道吗
算法应该是这个,但我卡住了。。你知道吗
import tar
for each folder
for each subfolder
tarfile.open(each_file)
tar.extractall(in_the_subdirectory_of_the_tarfile)
tar.close
你有什么办法让它工作吗?
谢谢!你知道吗
试试这个:
相关问题 更多 >
编程相关推荐