# normalize filename of file downloaded by DownThemAll
# convert 'extjs%E7%94%B5%E5%AD%90%E6%95%99%E7%A8%8B' to 'extjs电子教程'
# only tested on Windows XP
from glob import glob
import urllib2
import os
for fn in glob('*%*'):
newfn = urllib2.unquote(fn).decode('utf-8')
print "%s => %s" % (fn, newfn)
os.rename(fn, newfn)