Skip to content

Instantly share code, notes, and snippets.

@calvinchengx
Created May 10, 2013 01:12
Show Gist options
  • Save calvinchengx/5551787 to your computer and use it in GitHub Desktop.
Save calvinchengx/5551787 to your computer and use it in GitHub Desktop.
import os
import sys
for roots, dirlist , filelist in os.walk(os.curdir):
for file in [os.path.join(roots,filegot) for filegot in filelist]:
if "bz2" not in file:
print "Compressing %s" % (file)
os.system("bzip2 %s" % file)
print ":DONE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment