Worker file manager

1. Dir compare

The "Dir compare" command can be used to compare the directories in the active and inactive panel based on different criteria.

When starting the command, a window opens allowing to select and compare mode and how to handle the result.

After confirming the options, a progress window opens showing how many entries are left to compare. The total count will increase as the directories are read recursively. The current directory which is compared is shown in the window. If file content is used for comparison, a percentage is shown for files taking longer to compare (due to large file size).

After finishing comparing all entries in the active directory to all entries in the inactive panel, the result is applied to both sides. By default, all entries in the active panel will be selected if they are equal to the corresponding entry in the inactive panel. All unequal entries will be unselected. The entries in the inactive panel are marked inversely. All equal entries will be unselected and all equal entries will be selected.

The reason for selecting the entries differently in the active panel than for the entries in the inactive panel is that this gives the best flexibility about what to do with the result of the comparison. For example, if you want to have both sides selecting the equal entries, just inverse the selection of the inactive panel. You can also switch the active panel to basically invert the result.

It is also possible to put all equal entries into a new virtual directory instead of just changing the selection state. See below for the corresponding option. Basically, if chosen, the active panel will show a new virtual directory with all entries (gathered recursively) which are equal to the corresponding elements in the inactive panel. In contrast, the inactivate panel will show a virtual directory with all entries that are not equal to the element in the active panel.

1.1. Compare modes

Files are compared based on a selected set of attributes. If all of the attributes are equal, two files are considered equal and selected accordingly.
  1. Same file name
    All files are only compared based on their file name only. Two files are considered if their base file name is the same regardless of whether the file content is the same.
  2. Same file name and file size
    This mode takes the base file name and the file size into account for comparison.
  3. Same file name, file size and modification time
    This method also takes the modification time into account. A file is only equal to another if both the size and the last modification time is equal.
  4. Same file name and content
    In this mode the file content is compared so files are only equal if the file names matches and the content is identical. This is a slow method as it needs to read actual file data for comparison.
  5. Same file size
    Two files are considered the same if their file size is equal. This is a fast mode to find files of same file size.
  6. Same file checksum
    This mode calculates the sha256 checksum of each file and find matching checksum. This mode finds identical files with different file names. It is also slow due to reading the file data for checksum calculation.
Additional option:
  1. Max number of bytes to check
    If a non-zero number is entered, only this number of bytes of the beginning of each file is used for comparison of either the file content or file checksum. This is helpful for comparing large files for which you know they don't have a common part in the beginning of the file.

1.2. Handling results

  1. Change selection state
    This default mode will apply the comparison result to the selection state of each entry. In the active panel, all equal elements will be selected and all unequal elements will be unselected. In the inactive panel, the equal elements will be unselected while the unequal elements will be selected.
  2. Show as virtual directories
    In this mode all equal elements will be show in a new virtual directory in the active panel. The inactive panel will show a new virtual directory will all unequal elements.