Created
March 27, 2018 08:34
-
-
Save MikSDigital/2c9bd8721ba0b122383079c0dcf103b3 to your computer and use it in GitHub Desktop.
Removes symbols (spaces) from filenames in folder
This file contains hidden or 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 | |
path = os.getcwd() | |
filenames = os.listdir(path) | |
for filename in filenames: | |
print(filename) | |
os.rename(os.path.join(path, filename), os.path.join(path, filename.replace('---', '-'))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment