Skip to content

Instantly share code, notes, and snippets.

@msh5
Last active May 6, 2018 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msh5/cda7439eb1de26bc8e643b0372edb89b to your computer and use it in GitHub Desktop.
Save msh5/cda7439eb1de26bc8e643b0372edb89b to your computer and use it in GitHub Desktop.
List up names of files in a WinZip archived file.
#!/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