How to schedule a python scripts in plugin manager?
-
Hello!
I created a python scripts in plugin manager, to handle file encoding.
I would like this script to be running repeatedly.Is there a way to achieve this?
Any help is appreciate!import os; import sys; from Npp import notepad filePathSrc=r"\\mxns.loc\shares\use1-data\Global-SFTP\SFTP\Stage\s_lesters\toMXNS\in_bound" # Path to the folder with files to convert console.write(filePathSrc + "\r\n") for root, dirs, files in os.walk(filePathSrc): for fn in files: if fn[-4:] == '.csv' or fn[-4:] == '.inc' or fn[-4:] == '.css' or fn[-4:] == '.js' or fn[-4:] == '.htm' or fn[-5:] == '.html': # 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) console.write(root + "\\" + fn + "\r\n") notepad.runMenuCommand("Encoding", "Convert to ANSI") notepad.save() notepad.close() -
What does “repeated” mean in this case?
Time-based, event-based, or other triggers?
Because if you are the only one editing these files it
might be better to run the script once and then use
another script that ensures that files from that location
use Ansi encoding.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login