Created
March 1, 2016 04:49
-
-
Save huangziwei/b8868fa404c4344309f0 to your computer and use it in GitHub Desktop.
rename (multiple )files
This file contains 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
import os | |
import glob | |
filenames = glob.glob('file/path') | |
for i, file in enumerate(filenames) | |
os.rename(file, "new/file/name/%02d" % i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment