I need a script to go through all files in all directories and get rid of all special characters, ie: [{!@#$%^&*()-_=+\|]}[{'";:/?.>,<}]. Can anyone help me out?
Thank you!
I need a script to go through all files in all directories and get rid of all special characters, ie: [{!@#$%^&*()-_=+\|]}[{'";:/?.>,<}]. Can anyone help me out?
Thank you!
import glob
for fileName in glob.iglob("/home/**/*", recursive = True):
for character in specialCharacters:
fileName = fileName.replace(character, "")
Something like this? Doesn't get the directories but check out the glob docs, I am sure there is a way to get them.