Created
February 9, 2018 03:07
-
-
Save shravan-kuchkula/98ebdafc3315d222df4f295c664a242b to your computer and use it in GitHub Desktop.
remove spaces from filenames inside a directory using a python script
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 = os.listdir(os.getcwd()) | |
[os.replace(file, file.replace(" ", "_")) for file in files] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment