16. Command Line

WinMerge accepts several parameters from command line, in addition to paths to compare. Most of these parameters are are intended for using WinMerge as an external compare application. Or for starting from batch files.

Syntax for the command line is:

WinMerge [/r] [/e] [/f filter] [/x] [/s] [/ul] [/ur] [/ub] [/wl] [/wr] [/minimize] [/maximize] [/dl leftdesc] [/dr rightdesc] leftpath rightpath [outputpath]

All parameters start with "/" or with "-" prefix character. Pathnames don't have any prefix character.

[Tip] Tip

WinMerge accepts filename and foldername as path parameters, as long as the given folder contains file with same name than in first parameter.

For example, one can give a command: WinMerge C:\Folder\File.txt C:\Folder2. If C:\Folder2 contains file named File.txt WinMerge now compares files C:\Folder\File.txt and C:\Folder2\File.txt

Usually WinMerge requires that both path parameters (leftpath and rightpath) point to folders or files. It is not possible to compare folder to file (except in case described in above note). If WinMerge cannot find any of given paths, it opens Open-dialog.