Doing A Folder Merge

You can either merge the currently selected item (file or folder), or all items. When you have made all your operation choices (in all subfolders too) then you can start the merge.

Be aware that if you didn't specify a destination folder explicitly, then the destination will be C in three-folder mode, B in two-folder merge mode, and in sync-mode it will be A or/and B.

If you have specified a destination folder 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 folder comparison and merge. Check these options to avoid unpleasant surprises:

  • Recursive Folders: If this is off, then items in subfolders 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 FolderRescan 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 folder 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 folder then you usually also want to copy the identical files. In that case enable the Show Identical Files option. If your destination folder 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 Folder Merge in the Folder 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 Folder Merge or the F7 key. 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.