Notepad++ convert to UTF-8 multiple files
Here is what worked for me:
Go to Notepad++ -> Plugins -> Plugins Admin.
Find and install Python Script plugin.
Create new python script with Plugins -> Python Script -> New script.
Insert this code into your script:
import os;
import sys;
filePathSrc="C:\\Users\\YourUsername\\Desktop\\txtFolder"
for root, dirs, files in os.walk(filePathSrc):
for fn in files:
if fn[-4:] == '.txt' or fn[-4:] == '.csv':
notepad.open(root + "\\" + fn)
console.write(root + "\\" + fn + "\r\n")
notepad.runMenuCommand("Encoding", "Convert to UTF-8")
notepad.save()
notepad.close()
Replace C:\\Users\\YourUsername\\Desktop\\txtFolder
with path to your Windows folder where your files are.
Script works with .txt
and .csv
files and ignores all other files in folder.
Run script with Plugins -> Python Scripts -> Scripts -> name of your script
Got my mistake. My notepad is in german. So take care if it's called "Encoding" or in my case "Kodierung" and "Convert to UTF-8 without BOM" is "Konvertiere zu UTF-8 ohne BOM"
That helped me out!