Created
December 16, 2013 08:55
-
-
Save lyhapple/7984106 to your computer and use it in GitHub Desktop.
rename file name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #coding=utf-8 | |
| __author__ = 'lyhapple' | |
| import os | |
| dir_path = '%s' % u'D:\\迅雷下载\\' | |
| for name in os.listdir(dir_path): | |
| new_name = name.replace(u" 标清", "").replace("9vcd-", "") | |
| print new_name | |
| os.rename(dir_path + name, dir_path + new_name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment