Patchword can be used in different ways to compare directories and batch edit or rename files.
When comparing two directories, the first one is referred to as the original directory and the second one as the modified one.

Clicking on Compare starts a parallel scan of both directories. When the scan completes, the comparison is shown in a new window.
- Added files are labelled green and marked with the
symbol.
- Removed files are labelled red and marked with the
symbol.
- Modified files, or directories that contain added, removed or modified files or directories, are labelled orange and marked with the
symbol.
- Equal files, or directories that only contain equal files, are labelled gray and marked with the
symbol.

Match mode
The match mode determines which files are matched. Matching files are then compared to check if they are different, whereas non-matching files are marked as removals (if they are only present in the original directory) or additions (if they are only present in the modified directory). Matching directories are compared recursively.
Equal Name
An original file is matched to a modified file with the same name.
Use this mode when you have a directory and a copy of it that you added some files to, and/or removed some files from, and/or modified some files in, but didn’t change the file names.
Pairs Sorted by Name
The original and modified files are sorted separately by name, then they are matched pairwise until one of the two lists has no more elements.
Use this mode when you have a directory and a copy of it in which you renamed the files, e.g. by replacing or appending some text at the end. This will only work as expected if the alphabetical order of the original files is the same as the alphabetical order of the modified ones.
Matching files or directories that have a different name, or directories that contain such a file, have an icon before their name. Such files can be renamed automatically (see below).

Custom Name Map
Define a set of rules that transform the file names. These are effectively an edit script that iteratively finds and replaces bits of text and/or regular expressions in each file name.
Two files match if they have the same name mapping. For example, if you define a regular expression which replaces all digits (\d
) with an empty string, the files test.txt
and test123.txt
would match.
Matching files or directories that have a different name, or directories that contain such a file, have an icon before their name. Such files can be renamed automatically (see below).
File names mapped to an empty string are excluded. For example, replacing .DS_Store
with the empty string would exclude all files with that name, and if there are no changes outside of these files, the compared directories are considered equal.

Compare Mode
Matching files can be compared by their contents or by modification date and size. Comparing by contents produces the most accurate results but can take a long time depending how big the files are; comparing by modification date and size can be significantly faster and usually produces the same results, but won’t detect files that, for whatever reason, have the same modification date and size but different contents.
If you don’t want to be distracted by modified files (such as when you’re only interested in added and removed files, or just want to rename the modified files), set the Compare Mode to Disabled. In this case, matching files are always considered equal.
Reset files
Files or directories in the modified directory that are not equal to the original ones can be reset:
- Modified files are overwritten by the original ones.
- Files added to the modified directory are removed. (Warning: the added file will be lost.)
- Files removed from the modified directory are added again from the original one.
Control
-click a file or directory to open the context menu, then select Reset Modified File to Original.
Rename files
Matching files or directories that have a different name (when choosing a Match Mode other than Equal Name), or directories that contain such a file, have an icon before their name. Such files in the modified directory can be renamed so that they match the names in the original directory.
Control
-click a file or directory to open the context menu, then select Rename Modified File to Original.