Created
July 23, 2018 01:50
-
-
Save acbetter/01cb29d04e0368eb03353abd93dec3b7 to your computer and use it in GitHub Desktop.
Batch Rename Files by Python
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 | |
os.chdir('your-path-here') | |
print(os.listdir('.')) | |
for filename in os.listdir('.'): | |
os.rename(filename, filename.replace('src', 'opt')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment