Last active
May 17, 2019 03:54
-
-
Save southpolemonkey/63870aa6cdc3954f9b8a2e2154f5d88f to your computer and use it in GitHub Desktop.
bulk filename rename
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 glob | |
i = 0 | |
for file in glob.glob('<filepattern>'): | |
new_filename = 'example_' + str(i) + '.txt' | |
os.rename(file, new_filename) | |
# placeholder: filepattern |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment