OSDN Git Service

Add /table-delimiter, /table-quote and /table-allownewlinesinquotes command line...
[winmerge-jp/winmerge-jp.git] / Docs / Manual / EN / Command_line.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <article id="Command_line">
3   <title>Command line<indexterm>
4       <primary>command line</primary>
5     </indexterm><indexterm>
6       <primary>WinMerge command line</primary>
7
8       <see>command line</see>
9     </indexterm></title>
10
11   <para>The WinMerge command line accepts several parameters in addition to the
12   paths to compare. Most of these parameters are intended for using WinMerge as
13   an external compare application or starting a compare operation from a batch
14   file.</para>
15
16   <para>Use one of these formats for the WinMerge command:</para>
17
18   <para><cmdsynopsis sepchar=" ">
19       <command>WinMergeU</command>
20
21       <arg choice="opt" rep="norepeat"><option>/?</option></arg>
22     </cmdsynopsis></para>
23
24   <para><cmdsynopsis sepchar=" ">
25       <command>WinMergeU</command>
26
27       <arg choice="opt" rep="norepeat"><option>/r</option></arg>
28
29       <arg choice="opt" rep="norepeat"><option>/e</option></arg>
30
31       <arg choice="opt" rep="norepeat"><option>/f</option>
32       <replaceable>filter</replaceable></arg>
33
34       <arg choice="opt" rep="norepeat"><option>/m</option>
35       <replaceable>compare-method</replaceable></arg>
36
37       <arg choice="opt" rep="norepeat"><option>/t</option>
38       <replaceable>window-type</replaceable></arg>
39
40       <arg><option>/x</option></arg>
41
42       <arg><option>/xq</option></arg>
43
44       <arg><option>/s</option></arg>
45
46       <arg><option>/sw</option></arg>
47
48       <arg><option>/s-</option></arg>
49
50       <arg choice="opt" rep="norepeat"><option>/ul</option></arg>
51
52       <arg choice="opt" rep="norepeat"><option>/um</option></arg>
53
54       <arg choice="opt" rep="norepeat"><option>/ur</option></arg>
55
56       <arg choice="opt" rep="norepeat"><option>/u</option></arg>
57
58       <arg choice="opt" rep="norepeat"><option>/wl</option></arg>
59
60       <arg choice="opt" rep="norepeat"><option>/wm</option></arg>
61
62       <arg choice="opt" rep="norepeat"><option>/wr</option></arg>
63
64       <arg choice="opt" rep="norepeat"><option>/self-compare</option></arg>
65
66       <arg><option>/minimize</option></arg>
67
68       <arg><option>/maximize</option></arg>
69
70       <arg choice="opt" rep="norepeat"><option>/fl</option></arg>
71
72       <arg choice="opt" rep="norepeat"><option>/fm</option></arg>
73
74       <arg choice="opt" rep="norepeat"><option>/fr</option></arg>
75
76       <arg choice="opt" rep="norepeat"><option>/l</option>
77       <replaceable>linenumber</replaceable></arg>
78
79       <arg choice="opt" rep="norepeat"><option>/table-delimiter</option>
80       <replaceable>delimiter</replaceable></arg>
81
82       <arg choice="opt" rep="norepeat"><option>/dl</option>
83       <replaceable>leftdesc</replaceable></arg>
84
85       <arg choice="opt" rep="norepeat"><option>/dm</option>
86       <replaceable>middledesc</replaceable></arg>
87
88       <arg choice="opt" rep="norepeat"><option>/dr</option>
89       <replaceable>rightdesc</replaceable></arg>
90
91       <arg choice="opt" rep="norepeat"><option>/al</option></arg>
92
93       <arg choice="opt" rep="norepeat"><option>/am</option></arg>
94
95       <arg choice="opt" rep="norepeat"><option>/ar</option></arg>
96
97       <arg choice="opt" rep="norepeat"><option>/noninteractive</option></arg>
98
99       <arg choice="opt" rep="norepeat"><option>/noprefs</option></arg>
100
101       <arg choice="opt" rep="norepeat"><option>/ignorews</option></arg>
102
103       <arg choice="opt" rep="norepeat"><option>/ignoreblanklines</option></arg>
104
105       <arg choice="opt" rep="norepeat"><option>/ignorecase</option></arg>
106
107       <arg choice="opt" rep="norepeat"><option>/ignoreeol</option></arg>
108
109       <arg choice="opt" rep="norepeat"><option>/ignorecodepage</option></arg>
110
111       <arg choice="opt" rep="norepeat"><option>/ignorecomments</option></arg>
112
113       <arg choice="opt" rep="norepeat"><option>/unpacker</option>
114       <replaceable>unpacker-name</replaceable></arg>
115
116       <arg choice="opt" rep="norepeat"><option>/prediffer</option>
117       <replaceable>prediffer-name</replaceable></arg>
118
119       <arg choice="opt" rep="norepeat"><option>/cp</option>
120       <replaceable>codepage</replaceable></arg>
121
122       <arg choice="opt" rep="norepeat"><option>/cfg</option>
123       <replaceable>name=value</replaceable></arg>
124
125       <arg choice="opt" rep="norepeat"><option>/inifile</option>
126       <replaceable>inifile</replaceable></arg>
127
128       <arg choice="plain"
129       rep="norepeat"><replaceable>leftpath</replaceable></arg>
130
131       <arg cchoice="opt"
132       rep="norepeat"><replaceable>middlepath</replaceable></arg>
133
134       <arg choice="plain"
135       rep="norepeat"><replaceable>rightpath</replaceable></arg>
136
137       <arg choice="opt"
138       rep="norepeat"><option>/o</option>
139       <replaceable>outputpath</replaceable></arg>
140
141       <arg choice="opt"
142       rep="norepeat"><option>/or</option>
143       <replaceable>reportpath</replaceable></arg>
144
145     </cmdsynopsis></para>
146
147   <cmdsynopsis sepchar=" ">
148     <command>WinMergeU</command>
149
150     <arg choice="plain"
151     rep="norepeat"><replaceable>conflictfile</replaceable></arg>
152   </cmdsynopsis>
153
154   <para>Entering the command with no parameters or pathnames simply opens the
155   WinMerge window. Parameters are prefixed with either a forward slash (
156   <literal>/</literal> ) or dash ( <literal>-</literal> ) character. Pathnames
157   have no prefix character.</para>
158
159   <variablelist>
160     <varlistentry>
161       <term><option>/?</option></term>
162       <listitem>
163         <para>Opens WinMerge Help at this topic.</para>
164       </listitem>
165     </varlistentry>
166
167     <varlistentry>
168       <indexterm>
169         <primary>recursive folder compare</primary>
170       </indexterm>
171       <term><option>/r</option></term>
172       <listitem>
173         <para>Compares all files in all subfolders (recursive
174         compare). Unique folders (occurring only on one side) are listed in the
175         compare result as separate items. Note that including subfolders can
176         increase compare time significantly. Without this parameter, WinMerge
177         lists only files and subfolders at the top level of the two target
178         folders. It does not compare the subfolders.</para>
179       </listitem>
180     </varlistentry>
181
182     <varlistentry>
183       <indexterm>
184         <primary>WinMerge window</primary>
185         <secondary>closing</secondary>
186       </indexterm>
187
188       <term><option>/e</option></term>
189       <listitem>
190         <para>Enables you to close WinMerge with a single
191         <keycap>Esc</keycap> key press. This is useful when you use WinMerge as an
192         external compare application: you can close WinMerge quickly, like a
193         dialog. Without this parameter, you might have to press
194         <keycap>Esc</keycap> multiple times to close all its windows.</para>
195       </listitem>
196     </varlistentry>
197
198     <varlistentry>
199       <indexterm>
200         <primary>filters</primary>
201         <secondary>applying in command line</secondary>
202       </indexterm>
203
204       <term><option>/f</option></term>
205       <listitem>
206         <para>Applies a specified filter to restrict the
207         comparison. The filter can be a filemask like <filename><userinput>*.h
208         *.cpp</userinput></filename>, or the name of a file filter like
209         <userinput>XML/HTML Devel</userinput>. Add quotation marks around a filter
210         mask or name that contains spaces.</para>
211       </listitem>
212     </varlistentry>
213
214     <varlistentry>
215       <indexterm>
216         <primary>compare method</primary>
217         <secondary>applying in command line</secondary>
218       </indexterm>
219
220       <term><option>/m <replaceable>compare-method</replaceable></option></term>
221       <listitem>
222         <para>Sets the compare method to use for the comparison.
223         This can be one of the keywords <userinput>Full</userinput>,
224         <userinput>Quick</userinput>, <userinput>Binary</userinput>,
225         <userinput>Date</userinput>, <userinput>SizeDate</userinput> or 
226         <userinput>Size</userinput>.</para>
227       </listitem>
228     </varlistentry>
229
230     <varlistentry>
231       <indexterm>
232         <primary>window type</primary>
233         <secondary>applying in command line</secondary>
234       </indexterm>
235
236       <term><option>/t <replaceable>window-type</replaceable></option></term>
237       <listitem>
238         <para>Specifies the type of window in which to display files.
239         This can be one of the keywords <userinput>Text</userinput>,
240         <userinput>Table</userinput>, <userinput>Binary</userinput> or
241         <userinput>Image</userinput>.</para>
242       </listitem>
243     </varlistentry>
244
245     <varlistentry>
246       <term><option>/x</option></term>
247       <listitem>
248         <para>Closes WinMerge (after displaying an information
249         dialog) when you start a comparison of identical files. The parameter has
250         no effect after the comparison, for example if the files become identical
251         as a result of merging or editing. This parameter is useful when you use
252         WinMerge as an external compare application, or when you want to eliminate
253         unnecessary steps by ignoring files that don't have any
254         differences.</para>
255       </listitem>
256     </varlistentry>
257
258     <varlistentry>
259       <term><option>/xq</option></term>
260       <listitem>
261         <para>Is similar to <option>/x</option> but does not
262         show the message about identical files.</para>
263       </listitem>
264     </varlistentry>
265
266     <varlistentry>
267       <indexterm>
268         <primary>WinMerge window</primary>
269         <secondary>limiting instances</secondary>
270       </indexterm>
271
272       <term><option>/s</option></term>
273       <listitem>
274         <para>Limits WinMerge windows to a single instance.
275         For example, if WinMerge is already running, a new compare opens in the
276         same instance. Without this parameter, multiple windows are allowed:
277         depending on other settings, a new compare might open in the existing
278         window or in a new window.</para>
279       </listitem>
280     </varlistentry>
281
282     <varlistentry>
283       <term><option>/sw</option></term>
284       <listitem>
285         <para>Limit the WinMerge window to one instance as well as the option /s.
286          However, it waits for the instance displaying the window to terminate.
287         </para>
288       </listitem>
289     </varlistentry>
290
291     <varlistentry>
292       <term><option>/s-</option></term>
293       <listitem>
294         <para>Ensure that another instance is always executed, ignoring the
295         value of the "Allow only one instance to run" option.</para>
296       </listitem>
297     </varlistentry>
298
299     <varlistentry>
300       <indexterm>
301         <primary>MRU list</primary>
302       </indexterm>
303
304       <term><option>/ul</option></term>
305       <listitem>
306         <para>Prevents WinMerge from adding the left path to
307         the Most Recently Used (MRU) list. External applications should not add
308         paths to the MRU list in the Select Files or Folders dialog.</para>
309       </listitem>
310     </varlistentry>
311
312     <varlistentry>
313       <term><option>/um</option></term>
314       <listitem>
315         <para>Prevents WinMerge from adding the middle path to
316         the Most Recently Used (MRU) list. External applications should not add
317         paths to the MRU list in the Select Files or Folders dialog.</para>
318       </listitem>
319     </varlistentry>
320
321     <varlistentry>
322       <term><option>/ur</option></term>
323       <listitem>
324         <para>Prevents WinMerge from adding the right path to
325         the Most Recently Used (MRU) list. External applications should not add
326         paths to the MRU list in the Select Files or Folders dialog.</para>
327       </listitem>
328     </varlistentry>
329
330     <varlistentry>
331       <term><option>/u</option></term>
332       <listitem>
333         <para>Prevents WinMerge from adding either path (left
334         or right) to the Most Recently Used (MRU) list. External applications
335         should not add paths to the MRU list in the Select Files or Folders
336         dialog.</para>
337       </listitem>
338     </varlistentry>
339
340     <varlistentry>
341       <indexterm>
342         <primary>protecting files</primary>
343       </indexterm>
344
345       <term><option>/wl</option></term>
346       <listitem>
347         <para>Opens the left side as read-only. Use this when
348         you don't want to change left side items in the compare.</para>
349       </listitem>
350     </varlistentry>
351
352     <varlistentry>
353       <term><option>/wm</option></term>
354       <listitem>
355         <para>Opens the middle side as read-only. Use this
356         when you don't want to change right side items in the compare.</para>
357       </listitem>
358     </varlistentry>
359
360     <varlistentry>
361       <term><option>/wr</option></term>
362       <listitem>
363         <para>Opens the right side as read-only. Use this
364         when you don't want to change right side items in the compare.</para>
365       </listitem>
366     </varlistentry>
367
368     <varlistentry>
369       <term><option>/self-compare</option></term>
370       <listitem>
371         <para>Compares the specified file with a copy of the file.</para>
372       </listitem>
373     </varlistentry>
374
375     <varlistentry>
376       <indexterm>
377         <primary>WinMerge window</primary>
378         <secondary>opening minimized or maximized</secondary>
379       </indexterm>
380
381       <term><option>/minimize</option></term>
382       <listitem>
383         <para>Starts WinMerge as a minimized window.
384         This option can be useful during lengthy compares.</para>
385       </listitem>
386     </varlistentry>
387
388     <varlistentry>
389       <term><option>/maximize</option></term>
390       <listitem>
391         <para>Starts WinMerge as a maximized
392         window.</para>
393       </listitem>
394     </varlistentry>
395
396     <varlistentry>
397       <term><option>/fl</option></term>
398       <listitem>
399         <para>Sets focus to the left side at startup.</para>
400       </listitem>
401     </varlistentry>
402
403     <varlistentry>
404       <term><option>/fm</option></term>
405       <listitem>
406         <para>Sets focus to the middle side at startup.</para>
407       </listitem>
408     </varlistentry>
409
410     <varlistentry>
411       <term><option>/fr</option></term>
412       <listitem>
413         <para>Sets focus to the right side at startup.</para>
414       </listitem>
415     </varlistentry>
416
417     <varlistentry>
418       <term><option>/l <replaceable>linenumber</replaceable></option></term>
419       <listitem>
420         <para>Specifies a line number to jump to after loading the files.</para>
421       </listitem>
422     </varlistentry>
423
424     <varlistentry>
425       <term><option>/table-delimiter <replaceable>delimiter</replaceable></option></term>
426       <listitem>
427         <para>Specifies a delimiter character for table editing.</para>
428       </listitem>
429     </varlistentry>
430
431     <varlistentry>
432       <term><option>/dl</option></term>
433       <listitem>
434         <para>Specifies a description in the left side title
435         bar, overriding the default folder or filename text. For example:
436         <userinput>/dl "Version 1.0</userinput>" or <userinput>/dl
437         WorkingCopy</userinput>. Use quotation marks around descriptions that
438         contain spaces.</para>
439       </listitem>
440     </varlistentry>
441
442     <varlistentry>
443       <term><option>/dm</option></term>
444       <listitem>
445         <para>Specifies a description in the middle side title
446         bar, just like <option>/dl</option>.</para>
447       </listitem>
448     </varlistentry>
449
450     <varlistentry>
451       <term><option>/dr</option></term>
452       <listitem>
453         <para>Specifies a description in the right side title
454         bar, just like <option>/dl</option>.</para>
455       </listitem>
456     </varlistentry>
457
458     <varlistentry>
459       <term><option>/al</option></term>
460       <listitem>
461         <para>Auto-merges at the left side at startup.</para>
462       </listitem>
463     </varlistentry>
464
465     <varlistentry>
466       <term><option>/am</option></term>
467       <listitem>
468         <para>Auto-merges at the middle side at startup.</para>
469       </listitem>
470     </varlistentry>
471
472     <varlistentry>
473       <term><option>/ar</option></term>
474       <listitem>
475         <para>Auto-merges at the right side at startup.</para>
476       </listitem>
477     </varlistentry>
478
479     <varlistentry>
480       <term><option>/noninteractive</option></term>
481       <listitem>
482         <para>TBD</para>
483       </listitem>
484     </varlistentry>
485
486     <varlistentry>
487       <term><option>/noprefs</option></term>
488       <listitem>
489         <para>TBD</para>
490       </listitem>
491     </varlistentry>
492
493     <varlistentry>
494       <term><option>/ignorews</option></term>
495       <listitem>
496         <para>TBD</para>
497       </listitem>
498     </varlistentry>
499
500     <varlistentry>
501       <term><option>/ignoreblanklines</option></term>
502       <listitem>
503         <para>TBD</para>
504       </listitem>
505     </varlistentry>
506
507     <varlistentry>
508       <term><option>/ignorecase</option></term>
509       <listitem>
510         <para>TBD</para>
511       </listitem>
512     </varlistentry>
513
514     <varlistentry>
515       <term><option>/ignoreeol</option></term>
516       <listitem>
517         <para>TBD</para>
518       </listitem>
519     </varlistentry>
520
521     <varlistentry>
522       <term><option>/ignorecodepage</option></term>
523       <listitem>
524         <para>TBD</para>
525       </listitem>
526     </varlistentry>
527
528     <varlistentry>
529       <term><option>/ignorecomments</option></term>
530       <listitem>
531         <para>TBD</para>
532       </listitem>
533     </varlistentry>
534
535     <varlistentry>
536       <term><option>/unpacker</option></term>
537       <listitem>
538         <para>TBD</para>
539       </listitem>
540     </varlistentry>
541
542     <varlistentry>
543       <term><option>/prediffer</option></term>
544       <listitem>
545         <para>TBD</para>
546       </listitem>
547     </varlistentry>
548
549     <varlistentry>
550       <term><option>/cp</option></term>
551       <listitem>
552         <para>TBD</para>
553       </listitem>
554     </varlistentry>
555
556     <varlistentry>
557       <term><option>/cfg</option></term>
558       <listitem>
559         <para>TBD</para>
560       </listitem>
561     </varlistentry>
562
563     <varlistentry>
564       <term><option><replaceable>leftpath</replaceable></option></term>
565       <listitem>
566         <para>Specifies the folder, file or project file to open on the left side.</para>
567       </listitem>
568     </varlistentry>
569
570     <varlistentry>
571       <term><option><replaceable>middlepath</replaceable></option></term>
572       <listitem>
573         <para>Specifies the folder, file or project file to open on the middle side.</para>
574       </listitem>
575     </varlistentry>
576
577     <varlistentry>
578       <term><option><replaceable>rightpath</replaceable></option></term>
579       <listitem>
580         <para>Specifies the folder, file or project file to open on the right side.</para>
581
582         <para>WinMerge cannot compare files to folders, so the path parameters
583         (<option><replaceable>leftpath</replaceable></option>,
584         <option><replaceable>middlepath</replaceable></option> and
585         <option><replaceable>rightpath</replaceable></option>) must point to the
586         same target type (either folders or files). If WinMerge cannot find either
587         of the specified paths, it opens the Select Files or Folders dialog, where
588         you can browse for the correct paths.</para>
589
590         <tip>
591           <para>In file comparisons, you can specify a folder name in one of the
592           path parameters, as long as the folder contains a file with the same
593           name as the one specified in the other, file path.</para>
594
595           <para>For example, consider this command:</para>
596
597           <para><userinput>WinMergeU <filename>C:\Folder\File.txt</filename>
598           <filename class="directory">C:\Folder2</filename> </userinput></para>
599
600           <para>If <filename class="directory">C:\Folder2</filename> contains a
601           file named <filename>File.txt</filename>: WinMerge implicitly resolves
602           the second path as a file specification, and compares the two files. Of
603           course, the command is invalid if <filename
604           class="directory">C:\Folder2</filename> does <emphasis>not</emphasis>
605           contain a file named <filename>File.txt</filename>.</para>
606         </tip>
607         <para></para>
608       </listitem>
609     </varlistentry>
610
611     <varlistentry>
612       <indexterm>
613         <primary>merging differences</primary>
614         <secondary>result file</secondary>
615       </indexterm>
616
617       <term><option>/o <replaceable>outputpath</replaceable></option></term>
618       <listitem>
619         <para>Specifies an optional output folder where you want merged result files to be
620         saved.</para>
621
622         <para>The output path is rarely needed when you start WinMerge from
623         the command line. It is meant to be used with version control tools, where
624         you might need to specify a output path for the
625         <wordasword>result</wordasword> file. If you specify a output path,
626         WinMerge still shows only two or three files in the File Compare window. However,
627         if you save either of these files, it is written to the output path,
628         leaving the two or three source files intact.</para>
629
630         <para>Version control systems typically refer to the source and result
631         files using terms like <glossterm>theirs</glossterm>,
632         <glossterm>mine</glossterm>, and either <glossterm>merged</glossterm> or
633         <glossterm>resolved</glossterm>. If you specify a output path on the
634         WinMerge command line, and are working with a version control system, you
635         should list the files in that order.</para>
636       </listitem>
637     </varlistentry>
638
639     <varlistentry>
640       <term><option>/or</option></term>
641       <listitem>
642         <para>TBD</para>
643       </listitem>
644     </varlistentry>
645
646     <varlistentry>
647       <indexterm>
648         <primary>conflict files</primary>
649         <secondary>specifying on command line</secondary>
650       </indexterm>
651
652       <term><option><replaceable>conflictfile</replaceable></option></term>
653       <listitem>
654         <para>Specifies a conflict file, typically generated by a Version control system. The
655         conflict file opens in the File Compare window, where you can merge and
656         resolve conflicts, as described in <xref
657         linkend="ResolveConflictFiles" />. Note that no other paths can be used
658         with a conflict file.</para>
659       </listitem>
660     </varlistentry>
661
662     <varlistentry>
663       <indexterm>
664         <primary>ini file</primary>
665         <secondary>specifying on command line</secondary>
666       </indexterm>
667
668       <term><option>/inifile <replaceable>inifile</replaceable></option></term>
669       <listitem>
670         <para>specifies an INI file used to load and save settings instead of the registry.</para>
671       </listitem>
672     </varlistentry>
673
674   </variablelist>
675 </article>