Skip to content

Instantly share code, notes, and snippets.

@TimSC
Created August 11, 2017 10:46
Show Gist options
  • Save TimSC/8aa012bd450e5151602fb24b158d3e51 to your computer and use it in GitHub Desktop.
Save TimSC/8aa012bd450e5151602fb24b158d3e51 to your computer and use it in GitHub Desktop.
Rename files and folders by replacing substring
import os
if __name__ == "__main__":
fiList = list(os.listdir("."))
for fina in fiList:
print fina
os.rename(fina, fina.replace("3.0", "3.3"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment