Created
December 19, 2013 16:42
-
-
Save trigfa/8042299 to your computer and use it in GitHub Desktop.
Replaces spaces with underscores in file names. This script takes the directory name as an argument
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
#!/usr/bin/python | |
import os | |
import sys | |
files = os.listdir(sys.argv[1]) | |
for f in files: | |
os.rename(f, f.replace(' ', '_')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment