You may have the same photo saved several times on your Windows PC, but each copy has a different name. One file might be called IMG_2045.jpg, while another is saved as holiday-photo.jpg. At first glance, they look like separate pictures even though their contents may be identical.
This often happens when photos are downloaded from websites, transferred from phones, copied between folders or received through messaging applications. Over time, duplicate images can make photo collections harder to organise and use additional storage space.
Windows does not provide a simple built-in button to find every duplicate photo automatically. However, you can use file hashes, PowerShell or dedicated duplicate-finding software to identify matching images without relying on their filenames.
Why duplicate photos have different names
Different filenames do not necessarily mean different photos. A file can be renamed without changing the actual image data.
For example, you might have these files in separate folders:
IMG_2045.jpgWhatsApp Image 2026-11-18.jpgfamily-trip.jpgCopy of IMG_2045.jpg
If all four files contain exactly the same data, they are exact duplicates despite having different names. A filename-based search will not reliably identify them.
There is another situation worth understanding. Two photos may look identical but have different file contents because one was resized, compressed, rotated or saved in another format. These are visually similar images, not necessarily exact duplicates.
Understand the difference between exact and similar duplicates
Before choosing a tool, decide what kind of duplicate you want to find.
Exact duplicates: These files contain identical data. They may have different names or be stored in different folders, but their contents match byte for byte.
Visually similar photos: These pictures look the same or nearly the same, but their file data differs. This can happen when an image is resized, edited, compressed or converted from PNG to JPEG.
For example, an original 4000 × 3000 photo and a resized 1200 × 900 copy may show the same scene. A normal file hash will treat them as different files because their contents are not identical.
Method 1: Find exact duplicate photos using PowerShell
If you want to identify exact duplicates without installing software, PowerShell can calculate a cryptographic hash for each image. A hash is a value generated from a file’s contents. When two files have matching SHA-256 hashes, they have matching contents with an extremely high level of confidence.
This method works even if the filenames and folder locations are completely different.
Follow these steps:
- Open the Start menu and search for Windows PowerShell.
- Open PowerShell.
- Copy the command below.
- Replace the folder path with the location of your photo collection.
- Press Enter and wait for the scan to finish.
$folder = "D:\Photos"
Get-ChildItem -LiteralPath $folder -File -Recurse |
Where-Object { $_.Extension -match '^\.(jpg|jpeg|png|webp|bmp|gif|tif|tiff|heic)$' } |
Get-FileHash -Algorithm SHA256 |
Group-Object Hash |
Where-Object { $_.Count -gt 1 } |
ForEach-Object {
$_.Group | Select-Object Path, Hash
}
The command searches the selected folder and its subfolders, calculates a SHA-256 hash for each supported image file and groups files with matching hashes.
If two or more files appear in the same group, they have matching file contents. Their names and locations do not matter.
This command only reads file information and calculates hashes. It does not delete or modify your photos. It also checks only the image extensions listed in the command. Add other extensions if your collection uses additional image formats.
Method 2: Use a duplicate photo finder
PowerShell is useful for exact duplicates, but it does not recognise two resized or edited versions of the same photograph. If your photo collection contains many similar images, a dedicated duplicate finder may be more convenient.
These tools can compare image content using visual analysis rather than depending only on filenames or exact file hashes.
Some commonly used options include:
1. dupeGuru
dupeGuru is a duplicate-file finder that includes an image comparison mode. It can help identify pictures that are visually similar even when their filenames differ.
You can select the folders you want to scan and review the matching results before deciding what to remove. Its picture mode is more suitable for comparing images than a simple filename search.
2. AllDup
AllDup is a Windows duplicate-file finder with several comparison options. Depending on the selected search method, it can compare files by content, properties or image similarity.
It can be useful when you want to search multiple folders and review possible duplicate groups before removing anything. Check the selected comparison settings because exact file matching and image similarity are different operations.
How to identify resized or edited copies
Suppose you have two pictures of the same photograph. One is the original camera image, while the other was compressed by a messaging application. Both may look almost identical, but their file sizes, dimensions and hashes can be different.
For this type of duplicate, image-comparison software can use a technique called perceptual hashing. Instead of comparing every byte, it creates a compact representation of the visual image. Similar pictures can produce similar hashes even when their file data differs.
Perceptual comparison is useful, but it is not perfect. Two photographs of the same scene taken from slightly different angles may look similar to the software. Cropping, filters, brightness changes and image rotation can also affect the results.
For that reason, always open and inspect the suggested matches before deleting them. A similarity score is a way to identify candidates, not proof that two pictures are interchangeable.
Check photo dimensions and file sizes
Image dimensions and file sizes can help narrow down possible duplicates. For example, two files with the same dimensions and similar sizes may be worth checking together.
However, these details cannot confirm that two images are identical. Different photos can have the same dimensions, and the same photograph can have different file sizes after compression.
To check an image’s dimensions in Windows:
- Open File Explorer.
- Right-click the image.
- Select Properties.
- Open the Details tab.
- Look for the image dimensions, such as 1920 × 1080.
You can also enable the Dimensions column in File Explorer’s Details view when comparing multiple pictures. This makes it easier to spot files with matching resolutions.
How to remove duplicate photos safely
Finding duplicates is only half the job. Before removing any photos, make sure you are keeping the correct original copy.
Use these checks before deleting files:
- Open the images: Check whether the pictures really contain the same content.
- Compare image quality: Keep the higher-resolution or less-compressed version when appropriate.
- Check the folder location: One copy may belong to a backup, project or organised photo collection.
- Review metadata: Compare capture dates and other available details if they matter to your collection.
- Back up important photos: Keep another copy of valuable images before starting a large cleanup.
For exact duplicates, matching SHA-256 hashes provide strong evidence that the file contents are identical. For visually similar images, inspect the actual pictures before deciding which version to keep.
It is also better to move suspected duplicates into a temporary review folder or use the Recycle Bin first instead of permanently deleting them immediately. This gives you a chance to restore a photo if you remove the wrong copy.
Which method should you use?
The right method depends on what you are trying to find. A simple hash comparison is enough for identical copies, while visually similar images need a different approach.
| Method | What it finds | Best use |
|---|---|---|
| PowerShell with SHA-256 | Files with identical contents | Exact duplicates with different names |
| dupeGuru Picture mode | Visually similar pictures | Resized or slightly changed copies |
| AllDup image comparison | Duplicates based on selected comparison settings | Scanning large photo collections |
| File Explorer details | Matching dimensions and file information | Manually narrowing down possible matches |
Also Read: Why Some Windows Shortcuts Stop Working After Moving Folders
Final thoughts
Duplicate photos can have completely different filenames, so searching by name alone is not enough. If the images are exact copies, a SHA-256 comparison in PowerShell can identify them even when they are stored in separate folders.
When the pictures have been resized, compressed or edited, use an image-comparison tool instead. Review the suggested matches carefully and keep the best-quality version before removing anything.
A careful scan and review can help organise your photo collection without accidentally deleting pictures you still need.
About the Author
Himanshu writes about technology, software tools and practical digital solutions.








One comment on “How to Find Duplicate Photos With Different File Names”