Skip to content

Instantly share code, notes, and snippets.

@harperreed
Created April 10, 2017 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harperreed/ffdab13506232a8efaf6504590033d4d to your computer and use it in GitHub Desktop.
Save harperreed/ffdab13506232a8efaf6504590033d4d to your computer and use it in GitHub Desktop.
import os
import shutil
for filename in os.listdir("."):
if filename.startswith("r."):
#os.rename(filename, filename[7:])
exp = filename.split(".")
exp[1] = str(int(exp[1])+20)
newfilename = ".".join(exp)
shutil.copy2(filename,"renamed/"+newfilename)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment