WinMerge can be also used from commandline. There are several commandline switches to ease using WinMerge as external merge/diff application.
Syntax for commandline is:
|
/? or -? displays help message
/r or -r tells winmerge to compare directories recursively
/e or -e allows WinMerge to be closed with a single esc keypress
/f or -f allows selecting filter used. Filter can be filemask like "*.h *.cpp" or name of filefilter like "XML/HTML Devel". Quotation marks must be used if filter mask or name contains spaces
/ul or -ul tells winmerge to not add left path to MRU
/ur or -ur tells winmerge to not add right path to MRU
/ub or -ub tells winmerge to not add both paths to MRU
/wl or -wl initially opens left side as read-only
/wr or -wr initially opens right side as read-only
/dl or -dl adds a description for left side shown instead of directory/filename
/dr or -dr adds a description for right side shown instead of directory/filename
leftpath is the directory or filename to open on the left side
rightpath is the directory or filename to open on the right side
outputpath is an optional output directory where you want merged files to be saved
![]() |
leftpath and rightpath both has to be files or both has to be directories |
If both paths are not files or directories or one of paths is non-existant WinMerge shows Open-dialog for user to choose proper paths to open.