Name: Anonymous 2007-12-07 1:33
import os, time
os.system("dir /p /l /o:n /w > directory.txt")
gg = open("directory.txt")
g = gg.readlines()
gg.close()
os.system("del directory.txt")
g = g[5:]
g = [x.strip() for x in g]
h = []
for x in g:
xx = x.split()
for xxx in xx:
if xxx[0] != '[':
if len(xxx) == 17:
if xxx[-4:] in ['.png', '.gif', '.jpg']:
h = h + [xxx]
g = h
j = []
for x in g:
t = eval(x[:-7])
tt = time.strftime("%y%b%d-%H.%M.%S", time.gmtime(t))
# print x, t, tt
j = j + [tt + x[-4:]]
rn = "rename %s %s"
for x in range(len(j)):
j[x] = (os.path.abspath(g[x]), j[x])
j = [rn % x for x in j]
for x in j:
os.system(x)Look, it renames 4chan timestamp-named images to at least a human-readable format. TRY/CATCH BLOCKS ARE FOR FAGGOTS THIS WORKS FINE FOR ME AS LONG AS YOUR FOLDER DOESN'T CONTAIN ANY IMAGES WITH A 17-CHARACTER FILENAME THAT DOESN'T EVAL TO A PROPER TIMESTAMP. os.path.join() to taste, and chill for two hours. Cut into slices. Serves 12.