You can either merge the currently selected item (file or directory), or all items. When you have made all your operation choices (in all subdirectories too) then you can start the merge.
Be aware that if you didn't specify a destination directory explicitely, then the destination will be "C" in three directory mode, "B" in two directory merge mode, and in sync-mode it will be "A" or/and "B".
If you have specified a destination directory also check that all items that should be in the output, are in the tree. There are some options that cause certain items to be omitted from the directory comparison and merge. Check these options to avoid unpleasant surprises:
"Recursive Directories": If this is off, then items in subdirectories will not be found.
"Pattern"/"Anti-Pattern": Include/exclude items that match
"Exclude Hidden Files"
"Show"-options (Show Identical/Different Files, Files only in A/B/C)
If you change the settings in order to list more files, you must do a rescan via menu "Directory"->"Rescan" yourself. (The reason for this is that for faster comparison-speed KDiff3 omits the comparison for files suppressed by these criteria.) If you changed your file and dir patterns to exclude files, then the file-list will immediately be updated on closing the options-dialog.
Note that when you write to a completely new directory then you usually also want to copy the identical files. In that case enable the "Show Identical Files"-option. If your destination-directory is one of the inputs, then this isn't necessary because the file is already there.
If you are satisfied so far, the rest is easy.
To merge all items: Select "Start/Continue directory merge" in the "Directory"-menu or press F7 (which is the default shortcut). To merge only the current item: Select "Run Operation For Current Item" or press F6.
If due to conflicting filetypes still some items with invalid operations exist, then a messagebox will appear and these items will be pointed out, so you can select a valid operation for the item.
If you merge all items a dialog will appear giving you the options "Do it", "Simulate it" and "Cancel".
Select "Simulate it" if you want to see what would be done without actually doing it. A verbose list of all operations will be shown.
Otherwise select "Do it" to really start merging.
Then KDiff3 will run the specified operation for all items. If manual interaction is required (single file merge), then a merge window will open (see the big screenshot).
When you have finished with manually merging a file, again select "Start/Continue directory merge" or the key F7. If you haven't saved it yet, a dialog will ask you to do so. Then KDiff3 will continue with the next item.
When KDiff3 encounters an error, it will tell you so and will show the verbose-status-information. At the bottom of this list, there will be some error messages which should help you to understand the cause of the problem. When you continue merging (F7 key) KDiff3 will give you the choice to retry or skip the item that caused the problem. This means that before continuing you can choose another operation or solve the problem by other means.
When the merge is complete, then KDiff3 will inform you via a message box.
If some items were merged individually before running the directorymerge then KDiff3 remembers this (while this merge-session goes on), and doesn't merge them again when later the merge for all items is run. Even when the merge was skipped or nothing was saved these items count as completed. Only when you change the merge operation the "Done"-status of the item will be removed and it can be merged again.
Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team