Running Notepad++ from a bat file
-
Is it possible to call Notepad++ from a bat file? I need to do a “find and replace” for multiple XML files and Notepad is the tool for it if I can automate it. That or add the macro I also created to a bat file that I can then put on a schedule.
-
@Kelly-A ,
You can run Notepad++ from a batch file (
.bat
) – but there is no command line option to run a find-and-replace or macro from the command line, so you cannot initiate that task from your command-line call.If you have the PythonScript plugin, you could send that plugin a
-pluginMessage
command-line argument. You would then have to have a script in the PythonScript plugin that runs ATSTARTUP, which attaches a callback to the NPPN_CMDLINEPLUGINMSG notification, or just process it at startup.In searching back through the forum, proessing that notification in PythonScript has been suggested before, but I cannot currently find any mention of that being implemented yet, so i don’t think there’s an example for PythonScript.
-
@PeterJones Thanks so much for the quick response. I may just have the users run the macro since it doesn’t involve opening anything other than the app. It should be simple enough for a non-tech person and will do the job.
Again, I appreciate the reply.