Created
May 8, 2018 18:27
-
-
Save joshuacook/23a5f6d031f2ab3761214deb4c16e501 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 | |
files = [f.split(' - ') for f in os.listdir('./') if 'ipynb' not in f] | |
files_up = [[v.zfill(3), n] for v, n in files] | |
files = [v+" - "+n for v, n in files] | |
files_up = [v+" - "+n for v, n in files_up] | |
change = list(zip(files, files_up)) | |
for f in change[1:]: | |
os.rename(*f) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment