Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os;
- import sys;
- filePathSrc = notepad.prompt('Enter the path to the folder where the files are located', 'Convert files to UTF-8', 'C:\\Temp\\UTF8');
- if filePathSrc is not None and len(filePathSrc) >= 4:
- for root, dirs, files in os.walk(filePathSrc):
- for fn in files:
- if fn[-4:] == '.php' or fn[-4:] == '.htm' or fn[-5:] == '.html':
- notepad.open(root + "\\" + fn)
- console.write(root + "\\" + fn + "\r\n")
- notepad.runMenuCommand("Encoding", "Convert to UTF-8")
- notepad.save()
- notepad.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement