Chapter 2. Documentation of File Comparison And Merge

Table of Contents

Command-Line Options
Comparing 2 files:
Merging 2 files:
Comparing 3 files:
Merging 3 files:
Special case: Files with the same name
Commandline for starting a directory comparison or merge:
For more information on command line options use:
Open-Dialog
Paste and Drop Input
Interpreting The Information In The Input Windows
Merging And The Merge Output Editor Window
Navigation And Editing
Select, Copy And Paste
Saving
Finding Strings
Options
Font
Colors
Editor Settings
Diff & Merge Settings
Directory Merge
Regional and Language Options
Miscellaneous
Configuring Keyboard-Shortcuts
Preprocessor Commands
sed Basics
Examples For sed-Use In KDiff3
Order Of Preprocessor Execution
Warning

Command-Line Options

Comparing 2 files:

   kdiff3 file1 file2

Merging 2 files:

   kdiff3 file1 file2 -m
   kdiff3 file1 file2 -o outputfile

Comparing 3 files:

   kdiff3 file1 file2 file3

Merging 3 files:

   kdiff3 file1 file2 file3 -m
   kdiff3 file1 file2 file3 -o outputfile

Note that file1 will be treated as base of file2 and file3.

Special case: Files with the same name

If all files have the same name but are in different directories, you can reduce typework by specifying the filename only for the first file. E.g.:

   kdiff3 dir1/filename dir2 dir3

Commandline for starting a directory comparison or merge:

This is very similar, but now it's about directories.

   kdiff3 dir1 dir2
   kdiff3 dir1 dir2 -o destdir
   kdiff3 dir1 dir2 dir3
   kdiff3 dir1 dir2 dir3 -o destdir

For directory comparison and merge you can continue to read here.

For more information on command line options use:

   kdiff3 --help
Options:
  -m, --merge               Merge the input.
  -b, --base file           Explicit base file. For compatibility with certain tools.
  -o, --output file         Output file. Implies -m. E.g.: -o newfile.txt
  --out file                Output file, again. (For compatibility with certain tools.)
  --auto                    No GUI if all conflicts are auto-solvable. (Needs -o file)
  --qall                    Don't solve conflicts automatically. (For compatibility...)
  --L1 alias1               Visible name replacement for input file 1 (base).
  --L2 alias2               Visible name replacement for input file 2.
  --L3 alias3               Visible name replacement for input file 3.
  -L, --fname alias         Alternative visible name replacement. Supply this once for every input.
  -u                        Has no effect. For compatibility with certain tools.