Last active
August 29, 2015 14:05
-
-
Save kohnakagawa/5a5ea5e379dde9471932 to your computer and use it in GitHub Desktop.
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
| #!/usr/bin/python | |
| import os | |
| import sys | |
| argvs = sys.argv | |
| argc = len(argvs) | |
| if (argc != 4): | |
| print "Usage $ python %s beg_time end_time pud_digit" % argvs[0] | |
| quit() | |
| beg_time = int(argvs[1]) | |
| end_time = int(argvs[2]) | |
| digit = int(argvs[3]) | |
| for time in range(beg_time,end_time+1): | |
| os.rename('time' + str(time).zfill(digit) + '.jpeg', 'time' + str(time-beg_time).zfill(digit) + '.jpeg') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment