Run Compare v2 in cmd
Eric Castilleja last edited by
I am trying to run a comparison of two files from the command line.
The command I have researched online is Notepad++\plugins\ComparePlugin\compare.exe file1 file2
I navigate to Notepad++\plugins\ComparePlugin but there is no compare.exe file. I only see git2.dll and sqlite3.dll
In the plugins directory there is a ComparePlugin.dll file but no .exe file. I tried reinstalling the Compare plugin but still no .exe file.
Does anyone know how I can run the compare from the command line without the .exe?
PeterJones last edited by
Compare Plugin stopped distributing the compare.exe at some point. And there is no built-in way of running specific features of a plugin from the command line – unless the plugin has made use of Notepad++'s
-zfeature… but ComparePlugin has not (at some point, one of you who is looking for compare-starting-from-command-line should make a request in the Compare Plugin issues/feature-request page ).
However, last month’s conversation on a similar request has some pointers for how to get started making a PythonScript solution to parse the Notepad++
-zfeature, after which the PythonScript could start the ComparePlugin comparison on the two files.
Eric Castilleja last edited by
Thanks for the info. I’ll look into the scripting solution
guy038 last edited by guy038
compare.exeexists in the old
ComparePlugin.v188.8.131.52.bin.ziparchive and, probably, in the
v184.108.40.206version, too !
Unfortunately, this program is absent in all further releases of the
So here is the road map :
1) With the
Plugin Admin, install the last
v2.0.1release of the
comparePlugin. ( You may also install it, manually, from that link
2) Now, download the old
220.127.116.11.version of the Compare plugin, from :
3) From the
ComparePluginfolder of that archive, extract the two files,
compare.ini, only :
In the folder
%AppData%\Notepad++\plugins\ComparePlugin\ComparePlugin, along with the two libraries
sqlite3.dll, if you previously installed Notepad++, with the Installer
<N++ installation> folder\plugins\ComparePlugin\ComparePlugin, along with the two libraries
sqlite3.dll, if your installation of N++ was a local installation, from a
ziparchive, in any folder
4) Only in case of a local installation of Notepad++, you must configure the
compare.inifile, by adding, in the
[Notepad]section, the line :
path=<ABSOLUTE path of Notepad++>\notepad++.exe
The environment variables, as, for instance,
%USERPROFILE%and/or the special directories
..can be used to constitute the absolute path of N++, needed in the
compare.inifile ( NO need to surround all the path, with single or double quotes, if your path contains spaces )
In case of a local N++ installation, the two files
compare.inican be placed anywhere, as soon as they are, both, in the same folder ! ( Just remember that absolute path, for further use, of course ! )
5) Now, close any running instance of Notepad++
6) Then, from the “Start” menu, run a
7) Inside the DOS console window, whatever the current directory, type the command :
<ABSOLUTE path of compare.exe\compare.exe ABSOLUTE or RELATIVE path\File_A ABSOLUTE or RELATIVE path\File_B
with a space character after the expressions compare.exe and File_A
=> Your current Notepad++ should start, soon, with, only, the two
File_Bfiles, already compared ;-))
For instance, with my local N++
compare.inifiles are, both, in the
compare.inifile contains the active line
path=D:\@@\792\notepad++.exe, within the
All files and sub-folders, of my local N++ installation, are in folder
After starting a
cmdcommand and a
cd /d D:\@@\792command
I just typed the command
D:\@@\compare.exe license.txt license_2.txtwhere
license_2.txtis a copy of
license.txt, slightly modified
v7.9.2started with the two files opened in each view, and the comparison process terminated ;-)) Just as you would have run the command
notepad++ -nosession license.txt license_2.txtwith, in addition, the comparison process already launched !
compare.exe, remember to indicate, in the
DOScommand, its absolute path !
Of course, the location of two compared files can be completely independent
If a path of the files to compare ( absolute or relative ) contains spaces, just surround it with double quotes
I used the
v7.9.2release for tests but this method should work with later versions !
This post is an update of this old post
Moreover, you might be interested in the @dinkumoil’s solution, too, which comes next !
bobbywaz last edited by
Has there been any update in this? I too and trying to script compares for my clients but the compare.exe is still missing. Is there an effort to get the program back in the new release?