Last active
September 6, 2018 08:29
-
-
Save fuomag9/68c554a9de3c07673fc41a917904fd1e to your computer and use it in GitHub Desktop.
Replace spaces with underscores for files in execution folder
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
# coding=utf-8 | |
import os | |
from os import listdir | |
from os.path import isfile, join | |
bot_path=os.getcwd() | |
lista_cibo=[f for f in listdir(bot_path) if isfile(join(bot_path, f))] | |
for x in lista_cibo: | |
os.rename(x,x.replace(" ","_")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment