Skip to content

Instantly share code, notes, and snippets.

@kohnakagawa
Last active August 29, 2015 14:05
Show Gist options
  • Save kohnakagawa/5a5ea5e379dde9471932 to your computer and use it in GitHub Desktop.
Save kohnakagawa/5a5ea5e379dde9471932 to your computer and use it in GitHub Desktop.
#!/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