Created
April 10, 2017 17:59
-
-
Save harperreed/ffdab13506232a8efaf6504590033d4d 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 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