dirname = time.strftime("%Y/%m/%d", mtime)
if not os.path.exists(dirname):
print "Creating: %s" % (dirname)
os.makedirs(dirname)
dest = dirname + '/' + os.path.basename(filename)
if os.path.exists(dest):
dirname = time.strftime("%Y/%m/%d", mtime)
if not os.path.exists(dirname):
print "Creating: %s" % (dirname)
os.makedirs(dirname)
dest = dirname + '/' + os.path.basename(filename)
if os.path.exists(dest):