Skip to content

Instantly share code, notes, and snippets.

@farshidce
Created January 6, 2012 16:56
Show Gist options
  • Save farshidce/1571423 to your computer and use it in GitHub Desktop.
Save farshidce/1571423 to your computer and use it in GitHub Desktop.
rename rel files
import os
find = "1.8.0r-55-g80f24f2"
replace = "1.8.0"
files = os.listdir(".")
for f in files:
if f.index(find) != -1:
newf = f.replace(find,replace)
print newf
os.rename(f,newf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment