Skip to content

Instantly share code, notes, and snippets.

@daltonpearson
Created January 26, 2022 16:13
Show Gist options
  • Save daltonpearson/1031e1786691562999f1e05b4a4ed774 to your computer and use it in GitHub Desktop.
Save daltonpearson/1031e1786691562999f1e05b4a4ed774 to your computer and use it in GitHub Desktop.
import tarfile
import os
input = './input'
output = './output'
for dirpath, dir, files in os.walk(top=input):
for file in files:
tar = tarfile.open(os.path.join(dirpath, file))
tar.extractall(path=output)
tar.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment