Open Notepad++ and do filecompare
-
We want to open Notepad++ with a commandline (using cmd or PowerShell) in order to compare two files.
Any suggestions?
regards
Han -
@Han-Kortekaas said in Open Notepad++ and do filecompare:
We want to open Notepad++ with a commandline (using cmd or PowerShell) in order to compare two files.
Any suggestions?The Compare plugin used to be able to do this:
https://stackoverflow.com/questions/20170541/running-notepad-from-command-line-with-compare-plugin-showing-compare-resultBut I have the latest Notepad++ and Compare plugin and the
compare.exe
no longer seems to be included.Maybe a macro or a PythonScript startup script could help here?
Cheers.
-
@Michael-Vincent said in Open Notepad++ and do filecompare:
Maybe a macro or a PythonScript startup script could help here?
(Linking to the old sourceforge page is not the best place to start; that site is very out of date, compared to the PythonScript v1.5.4 that you can get from the Plugins Admin. The github PythonScript mainpage is probably a better link for the plugin.)
If you want to use PythonScript to call a plugin command, you should probably start with @Ekopalypse’s
-z
command line processing example . The-z
, as described in the online usermanual allows you to separateextensionscommand-line arguments, so Notepad++ will ignore any options after that, but plugins can see them in the command line and trigger some action. @Ekopalypse’s example showed launching the menu command View > Monitoring…, but you can also use the same technique but thenotepad.runPluginCommand()
to run a specific plugin command, like enabling compare on the two opened files. -
Michael and Peter, thanks we’ll look in to that