Skip to main content
Storage & files

Folder Comparison

Compare two folders file by file and detect when a replication or restore drifts from the original.

The Folder Comparison check compares two folder trees on a device file by file and reports missing, extra or different files. This lets you catch a replication that has fallen behind or a restore that does not match the original. The check runs on Windows, Linux, and macOS (x64 and Arm64 each) every 60 minutes. The interval belongs to the check itself and cannot be changed per assignment.

Prerequisites

  • You need the Monitoring Check Management permission.
  • The target device must have a connected agent.
  • Both folders must be reachable from that device, and the agent process needs read permission for both folders, including all subfolders and files.

Steps

  1. Go to Devices and open the device.
  2. Click the Checks tab → Add Check → Folder Comparison.
  3. Under Reference folder, enter the folder that is expected to be correct, for example D:\Data\Projects.
  4. Under Folder to compare, enter the copy that should match it, for example E:\Replica\Projects.
  5. Optional: under Excluded file names, add files to ignore in both folders, such as Thumbs.db or .DS_Store.
  6. Click Add Check.

The first result then appears in the device's Checks tab.

Settings

FieldTypeRequiredDefaultDescription
Reference folderStringYes—Absolute path of the folder that is expected to be correct
Folder to compareStringYes—Absolute path of the folder compared against the reference
Include subfoldersbooleanNotrueWhen disabled, the check only compares the files directly inside the two folders
Compare file contentsbooleanNotrueCompares files of equal size by a SHA-256 hash of their contents. When disabled, size and modification time must match exactly
Excluded file namesListNo—File names ignored in both folders at every level. The name must match exactly (case-insensitive); wildcards and folder names are not supported
Report differences as warningbooleanNofalseReports differences as Warning instead of Critical
Maximum files per folderIntegerNo20000If either folder contains more files (after exclusions), the check reports a warning instead of comparing. Values of 0 or less count as 20000

How the check compares

  • The check matches the files of both folders by their relative path. A missing file exists in the reference folder but not in the folder to compare. An extra file exists only in the folder to compare. A different file exists in both folders but does not match.
  • Files of different size always count as different. For files of equal size, Compare file contents decides whether the contents or the modification time are compared.
  • On Windows, path case does not matter. On Linux and macOS, Report.txt and report.txt count as two different files.
  • Only files are compared. The check does not report empty folders that are missing on one side.
  • Hidden and system files are included. The check does not walk into linked folders such as symbolic links or junctions.
  • With Compare file contents, every run fully reads each file of equal size on both sides. For large data sets this puts a corresponding load on the disks.
  • Without Compare file contents, your copy or replication tool must preserve the files' modification time. Otherwise the check reports every copied file as different.

Results

SituationResult
No differencesOK
At least one missing, extra or different fileCritical, or Warning with Report differences as warning
Reference folder or folder to compare does not existWarning; the message shows the path that was not found
One of the folders contains more files than Maximum files per folderWarning; the message shows the configured maximum
A folder or subfolder cannot be readWarning with the operating system's error message; in this case the check compares nothing

A single file that cannot be read during the comparison, or that disappears meanwhile, counts as different. The check therefore never reports a match for content it did not actually read.

The short result reads, for example, "Folder comparison — Critical: 3 difference(s)". The detailed result text shows:

  • Reference and Compare: the two paths with their file counts
  • Differences: the total, split into missing, extra and different
  • up to 10 paths per category, prefixed with "missing:", "extra:" or "different:"; if there are more, "(list truncated)" follows

FAQ

The check compares the state at the time it runs. Files that changed in the reference folder since the last replication run therefore appear as different, missing or extra until the next replication has transferred them. You can add frequently changing files with a known name under Excluded file names. If short delays are normal, enable Report differences as warning.

No. Excluded file names only applies to file names, not to folders. To compare only part of a folder tree, choose the matching subfolders as Reference folder and Folder to compare, or create several checks.