最新消息:

python multi rename files

developing ganko 8448浏览 0评论

# -*- coding: cp936 -*-
import os
from findtools.find_files import (find_files, Match)
path=’/Users/apple/node/test’
found_files = find_files(path)

for found_file in found_files:
print found_file
newname=found_file.replace(‘str1′,”)
os.rename(os.path.join(path,found_file),os.path.join(path,newname))

转载请注明:Ganko Tech » python multi rename files

与本文相关的文章

  • Sublime Text search node.js project exclude folder
    Sublime Text search node.js project exclude folder
  • Macbook使用触摸板代替鼠标
    Macbook使用触摸板代替鼠标
  • Source tree and beyond compare diff setting
    Source tree and beyond compare diff setting
  • Solve node-gyp rebuild error
    Solve node-gyp rebuild error