python文件内容如下:
# import
# sdir='/usr/local/mldonkey/incoming/'
# sNum='0123456789'
# def filenames=os.listdir(sdir) for filename in filenames : if filename != convertName(filename) print filename + ' os.rename(sdir + filename
# def location = 0 ret = "" while True : if location + 8 <= len(s) : subStr = s[location:location + 8] if check(subStr) : ret += "%" + location = location + 8 else : ret += s[location :location + location = location + 1 else : ret += s[location:] break return urllib.unquote(ret)
# def if len(s) != 8 : return False
if s[0] != '_' or s[4] != '_' : return False
if (s[1] in sNum) and (s[2] in sNum) and return True return False
# convert() |
要运行此脚步,需要Python2.4,在命令行输入:
python mldonkey.py
运行即可。