|
|
@ -19,9 +19,9 @@ for filename in os.listdir('.'): |
|
|
|
# date=mod_date) |
|
|
|
# date=mod_date) |
|
|
|
directory = os.path.join('{year:0>4}'.format(year=mod_date.year), |
|
|
|
directory = os.path.join('{year:0>4}'.format(year=mod_date.year), |
|
|
|
'{month:0>2}'.format(month=mod_date.month)) |
|
|
|
'{month:0>2}'.format(month=mod_date.month)) |
|
|
|
print '{filename} will be moved to {directory}'.format( |
|
|
|
print ('{filename} will be moved to {directory}'.format( |
|
|
|
filename=filename, |
|
|
|
filename=filename, |
|
|
|
directory=directory) |
|
|
|
directory=directory)) |
|
|
|
|
|
|
|
|
|
|
|
try: |
|
|
|
try: |
|
|
|
os.makedirs(directory) |
|
|
|
os.makedirs(directory) |
|
|
|