Compare and Sync Folders with Code Compare

Overview

If you are searching for a superior folder comparison software, look no further. Advanced directory comparison tool implemented in Code Compare can easily solve every possible problem caused by folder differences. Files from a project developed by a whole team of developers can quickly become a mess. The proposed solution can help with detecting the tiniest changes between folders by means of comparing directory trees and merging the entire folder hierarchy.

While it is applicable to any file types, our folder synchronization utility can prove especially useful when comparing source code or web pages. By default, differences are highlighted with standard commonly-used colors, but they can be changed in the Code Compare's Options menu. All other Code Compare options can be applied to folder merge as well. This functionality can also help you with comparing and merging entire branches taken from a version control system.

In addition to comparing folders, the Synchronize Folder popup menu also allows you to synchronize them.

Compare folders

You can start comparing the contents of two folders by selecting them in the Windows Explorer and choosing Compare in the Code Compare option from the context menu. Another way to add your folders is pressing the Browse button in Code Compare and selecting the folders in the browser window that will be opened.

The folders are then placed in two panes, with differences being highlighted in preset colors, so that you can compare folders just like you compare your files.

From here, you can copy added or modified files from one pane to the other by selecting the files in question and choosing the Copy to Right (Left) option from the context menu.

Compare two folders - basic operations

Filtration

The Code Compare directory comparison utility can make folder comparison even more convenient - it comes with a comprehensive filtration menu, which allows you to hide files and folders you don’t need at the moment.

The folder comparison tool provides a simple way to hide identical files and folders. Just right-click on the control bar and choose Hide identical. Identical files will be excluded from the comparison window making visual comparison even easier for you.

Hiding identical files

The example below shows how to hide *.suo files as well as bin and obj folders.

How to hide *.suo files

Open the Tools -> Options menu, move to the Folder - Filters option and set filtration preferences as required. You can exclude certain file names, extensions or folders from comparison as well as specify the ones that should be compared primarily. Other possible filtration criteria include system/hidden files, empty folders and files with certain size or timestamp.

Folder comparison options

Code Compare will filter the chosen content and the resulting folder comparison window will look like this.

Result of folder comparison

For details on the major feature set of our file diff and merge tool, refer to the overview page of Code Compare.

Synchronize folders

Code Compare can be used as a tool that allows you to easily sync files between two folders. There are two ways of synchronizing folders in Code Compare:

  • copying files and folders from one pane to the other;
  • using the dedicated folder synchronization feature.

Copying Files and Folders from One Pane to the Other

Using this approach, you can copy one or multiple files at a time from one pane to the other. To do this, follow these steps:

  1. Select the required files in the source pane.
  2. In the Changes menu, choose the Copy Selected to Right or Copy Selected to Left command.
    - or -
    Use the corresponding button on the Folder Comparison toolbar.
    - or -
    Right-click the selected files to call their popup menu, and choose the Copy to Right or Copy to Left option.

Synchronizing Folders

Using this approach, you can copy the contents of the source pane to the target pane. To achieve this, you can:

  • In the Changes menu, select the Synchronize sub-menu and then select the Mirror Left in Right or Mirror Right in Left command.
  • - or -
  • Use the corresponding button on the Folder Comparison toolbar.
  • - or -
  • Right-click in the required pane of document area, and choose Copy Selected to Right or Copy Selected to Left option.