Created
January 1, 2019 12:15
-
-
Save daejinseok/7dbf79b0d5ee310233e759de1a273ac4 to your computer and use it in GitHub Desktop.
파일 이름 변경
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 glob | |
import os | |
l = glob.glob('*.jpg') | |
for nm in l : | |
print(nm[:26], '{:04d}'.format(int(nm[26:-4])), '.jpg') | |
os.rename(nm, nm[:26]+'{:04d}'.format(int(nm[26:-4]))+'.jpg') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment