Last active
May 6, 2018 13:40
-
-
Save msh5/cda7439eb1de26bc8e643b0372edb89b to your computer and use it in GitHub Desktop.
List up names of files in a WinZip archived file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# curl https://gist.githubusercontent.com/msh5/cda7439eb1de26bc8e643b0372edb89b/raw/list_winzipped_filenames.py | python - ~/Downloads/xxx.zip | |
import sys | |
import zipfile | |
with zipfile.ZipFile(sys.argv[1]) as fp: | |
for fname in fp.namelist(): | |
print fname.decode("shift_jis") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment