Finding duplicates
Find duplicates looks for files with the same content in the folders and drives you choose. The results open as a tab grouped by content, with the groups that waste the most space on top. You mark the copies you don't need and recycle them, delete them, move them elsewhere or replace them with links. Whatever you do, one copy of every group always stays.
Start a search
- Right-click one or more folders or drives and choose Find duplicates…. With nothing selected, the menu on empty space searches the current folder.
- In the command palette (Ctrl+Shift+P), "Find duplicates".
- From a script:
mo --cmd tools.find-duplicates, or with foldersmo --cmd "tools.find-duplicates=D:\Photos;E:\Backup"(see Automation and scripting).
There is no default shortcut; you can assign one in Settings > Shortcuts.
The Find duplicates dialog
| Field | Meaning |
|---|---|
| Where to search | the folders and drives; Add folder… adds more. Overlapping folders (C:\ and C:\Users) are merged, so no file is counted twice. |
| Match | Same content, or Same content and name |
| Size | from - to, in B / KB / MB / GB (a click switches the unit); empty = no limit. Empty files are never duplicates. |
| Types | All, Pictures, Videos, Music and audio, Documents, Archives - can be combined - or your own mask such as *.psd;*.raw |
| Exclude | masks of files and folders, e.g. *.tmp; node_modules |
| Skip system folders (Windows, Program Files, Recycle Bin), Include hidden and system files |
The dialog remembers what you used last time. Links (junctions, symbolic links) are not followed, and files that are only online in the cloud (OneDrive) are not downloaded - the results say how many were skipped.
How it searches
Only files that can be copies are read at all:
- Files are grouped by size. A file with a unique size is never opened.
- Files of the same size are compared by their beginning and end.
- Only the files that still match are read whole.
Each physical disk is read by its own threads, and different disks are read at the same time. A hard disk (HDD) gets a single thread, because several would make its head jump back and forth. When Everything is running and indexes the folder, it supplies the list of files and no disk has to be scanned; the dialog says so up front, and the results tab notes that folders you excluded in Everything are missing.
Fingerprints of files already read are kept on disk, so searching the same folders again (or after Stop) does not read unchanged files again.
The results tab
The search opens a tab Duplicates:
- Each group is a section with the number of copies, the size and how much you can save. Sections can be collapsed like any other.
- Rows are ordinary items: the preview, opening, copying the path and the context menu work as in any folder.
- The summary says how many groups and copies were found and how much space can be saved.
- Hard links to the same file count as one item with a +1 link tag; they don't add to the savings.
Mark what to remove
Actions work only on the checked files, not on the selection. The selection stays free for the preview, copying paths and so on - one careless Ctrl+A marks nothing for deletion.
When a group is found, everything except the oldest file is checked, as a proposal. Nothing happens until you start an action. The file left unchecked in a group shows a keep tag.
- Click the check box in front of a name to toggle one row.
- Insert toggles the current row and moves down; Ctrl+Space toggles it without moving (in Detail).
- The context menu has Mark selected and Unmark selected for a selection.
- Mark in the band applies a rule to every group:
| Rule | Checks |
|---|---|
| All except the oldest | everything but the oldest file (by date modified) |
| All except the newest | everything but the newest |
| All except the shortest path / longest path | everything but the file with the shortest / longest path |
| All in folder… | only files under the chosen folder (for example a backup) |
| All outside folder… | the opposite - keeps the copies in the chosen folder |
| Only copies named "(1)", "- Copy", "copy" | the typical names of copies |
| Invert within groups, Clear marks |
If a rule would check every file of a group, it keeps one and the band says in how many groups that happened. You can check a whole group by hand, but actions skip such groups and tell you.
Actions
| Button | What it does | Undo |
|---|---|---|
| Recycle (Delete) | moves the checked files to the Recycle Bin | Ctrl+Z |
| Delete permanently (Shift+Delete) | deletes them; each file is first compared byte by byte with the kept copy | no |
| Move… | moves them to a folder, optionally with Keep the folder structure (destination\C\Users\…) | Ctrl+Z |
| Replace with link | replaces each copy with a hard link (same NTFS disk) or a symbolic link to the kept file | Ctrl+Z |
Before any action:
- The confirmation shows the number of files and groups and the space it frees.
- Every file and the kept copy are checked against the search: a file that changed or disappeared since then is skipped and reported.
- A file that is just another path to the kept copy (the same file through a mapped drive, for example) is skipped.
- Files on a drive without a Recycle Bin (USB stick, network) can't be recycled; Recycle skips them and says so. Use Delete permanently for those.
Finished rows disappear from the tab, groups with a single file left disappear too, and the summary is recalculated.
Hard and symbolic links
A hard link makes the copy another name of the kept file - the data is stored once. It works only on the same NTFS disk. Editing one of them changes all of them, and they share the date modified and attributes. Undo turns the link back into a separate copy.
A symbolic link also works across disks, but it needs Developer Mode (Windows Settings) or administrator rights - without them the option is unavailable. Deleting the kept file breaks the links.
Turning it off
Settings > Tools > Find duplicates tool removes the menu item and the palette command. No duplicates in search results, which hides identical files in a search, works either way.