Skip to content

Instantly share code, notes, and snippets.

View fuomag9's full-sized avatar
🥝
Available

fuomag9

🥝
Available
View GitHub Profile
@fuomag9
fuomag9 / space2underscore.py
Last active September 6, 2018 08:29
Replace spaces with underscores for files in execution folder
# 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(" ","_"))