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.
- /? opens this help.
- /r tells WinMerge to compare folders
recursively . Normally WinMerge does not compare subfolder contents but
does the "flat" compare showing the files in compared folders and
subfolders as separate items. Using /r tells WinMerge to compare all
files in all subfolders. When subfolders are included, only unique
subfolders are visible as separate items in compare results. Note that
including subfolders can increase compare time remarkably.
- /e allows WinMerge to be closed with a single
Esc keypress. This is useful when using WinMerge as an
external compare application. WinMerge can act like an dialog which is
easy and fast to close.
- /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.
- /x closes WinMerge after information dialog
when files are identical. This parameter is useful when WinMerge is used
as an external compare application. It helps to faster process and/or
ignore files which don't have any differences.
- /s enables single-instance behavior. If there
is already WinMerge running new compare is opened to that same instance.
Depending on other settings (if multiple windows are allowed) new
compare is opened to existing or new window.
- /ul tells WnMerge to not add left path to MRU.
External applications should not add paths to Open-dialog's MRU
lists.
- /ur tells WinMerge to not add right path to
MRU. External applications should not add paths to Open-dialog's MRU
lists.
- /ub tells WinMerge to not add both paths to
MRU. External applications should not add paths to Open-dialog's MRU
lists.
- /wl initially opens left side as read-only.
Use this when you don't want to change left-side items in
compare.
- /wr initially opens right side as read-only.
Use this when you don't want to change right-side items in
compare.
- /minimize starts WinMerge as minimized. This
option can be used to start WinMerge minimized for lenghty
compares.
- /maximize starts WinMerge as
maximized.
- /dl adds a description for left side shown
instead of folder / filename. This allows showing version number or
label for compared items. Like "Version 1.0" or "Work Copy".
- /dr adds a description for right side shown
instead of folder / filename. This allows showing version number or
label for compared items. Like "Version 1.0" or "Work Copy".
- leftpath is the folder or filename
to open on the left side.
- rightpath is the folder or filename
to open on the right side.
- outputpath is an optional output
folder where you want merged files to be saved.
![[Tip]](images/tip.gif) |
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.