# 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)
Python小脚本: 转换DownThemAll下载的文件名中的%E7等字符
最新推荐文章于 2022-08-05 11:23:47 发布