I have got below script from the One of the discussions in this sourceforge and itis good for converting the files to ANSI formatany specific format. However i have to run this every one hour for a specfiic folder as lot of uncides files push to taht specific folder. Can someone help me if this can be run as Batch file without manual run from Notepad++ ( i want to run below script only). Please suggest
import sys;
from Npp import notepad
filePathSrc="C:\Users\vnsan\Desktop\Unicode\" # Path to the folder with files to convert
for root, dirs, files in os.walk(filePathSrc):
for fn in files:
if fn[-4:] == '.txt': # Specify file types, taking care to change the fn[number] to correspond to length of the file's extension including the .
notepad.open(root + "\" + fn)
notepad.runMenuCommand("Encoding", "Convert to ANSI")
notepad.save()
notepad.close()
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
HI All,
I have got below script from the One of the discussions in this sourceforge and itis good for converting the files to ANSI formatany specific format. However i have to run this every one hour for a specfiic folder as lot of uncides files push to taht specific folder. Can someone help me if this can be run as Batch file without manual run from Notepad++ ( i want to run below script only). Please suggest
import sys;
from Npp import notepad
filePathSrc="C:\Users\vnsan\Desktop\Unicode\" # Path to the folder with files to convert
for root, dirs, files in os.walk(filePathSrc):
for fn in files:
if fn[-4:] == '.txt': # Specify file types, taking care to change the fn[number] to correspond to length of the file's extension including the .
notepad.open(root + "\" + fn)
Have a look at the "threading" library Timer object.
Test email reply. Please disregard.
On Sun, Mar 31, 2019 at 7:52 AM Sasumner sasumner@users.sourceforge.net
wrote: