Continusally to Unzip zip files in folders and subfolders with python - i didn't get an answer. i work with python 2.7.8 and arcmap 10.3
and i don't why this code does not work with python 2.7.8:
Finally, this work's for me.
import zipfile,fnmatch,os
rootPath = r"C:\Project"
pattern = '*.zip'
for root, dirs, files in os.walk(rootPath):
for filename in fnmatch.filter(files, pattern):
print(os.path.join(root, filename))
zipfile.ZipFile(os.path.join(root, filename)).extractall(os.path.join(root, filename.split(".")[0]))
for completeness this answer is also in Unzip zip files in folders and subfolders with python - Stack Overflow
i moved it now to Python.
Timothy Hales an example of the limited moderator ability to move "Developer" threads when posted in the general Discussion section Python development won't get selected unless they navigate. Again the suggestion to move/alter Developer from level one
Suggest moving this to Python
You don't have an object named 'zip' that you're calling in the last line. Read the rest of the link/thread that you posted, especially Dan Patterson's reply about researching the module and how to properly use it to extract a zip file. Throw the code he used there into a for loop, and run it against a directory to unzip all archives.
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.