質問編集履歴
1
コードの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -40,4 +40,18 @@
|
|
40
40
|
RuntimeError: Bad password for file <ZipInfo filename='IMG_0645.jpg' compress_ty
|
41
41
|
pe=99 external_attr=0x20 file_size=35427 compress_size=23364>
|
42
42
|
|
43
|
+
```
|
44
|
+
|
45
|
+
### 追記
|
46
|
+
```python
|
47
|
+
import zipfile, os
|
48
|
+
myfile =[]
|
49
|
+
for filename in os.listdir('.'):
|
50
|
+
if filename.endswith('.zip'):
|
51
|
+
myfile.append(filename)
|
52
|
+
|
53
|
+
for filename in myfile:
|
54
|
+
myfile_obj = zipfile.ZipFile(filename)
|
55
|
+
myfile_obj.extractall(pwd='rabbit'.encode('ascii'))
|
56
|
+
myfile_obj.close
|
43
57
|
```
|