Created
March 25, 2012 17:55
-
-
Save sjovang/2198618 to your computer and use it in GitHub Desktop.
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
import os, shutil | |
path = "/home/trond/Donald" | |
authors = os.listdir(path) | |
for author in authors: | |
if author != "cbz": | |
years = os.listdir(path + "/" + author) | |
for year in years: | |
stories = os.listdir(path + "/" + author + "/" + year) | |
for story in stories: | |
print path + "/" + author + "/" + year + "/" + story | |
os.chdir(path + "/" + author + "/" + year) | |
shutil.make_archive("/home/trond/Donald/cbz/" + author + "/" + year +"_" + story, "zip", story) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment