import datetime,os
thisdate = datetime.date.today()
foldername = "c:\photos\source\%04d\%04d%02d%02d" % (thisdate.year,thisdate.year,thisdate.month,thisdate.day)
try: os.makedirs(foldername)
except WindowsError, e:
print e.strerror
if e.winerror <> 183:
input()
os.system("explorer "+foldername)
I'll comment it up and add some more logic later, but the gist of it is that it automates the creation and opening of a folder which I do when I transfer photos. It'll save about 30 seconds each time it's run.
One small set on a long journey.
--Mike--
PS: I used a variant of this code to colorize/HTML the code.
No comments:
Post a Comment