How To Find and Remove Duplicate Files On Windows
How To Find and Remove Duplicate Files On Windows
Duplicate files do nothing but clutter up your drive, make your PC run slower, and increase the
difficulty level significantly when it comes to finding the right version of a specific file: is it the
one I just updated, or the other one?
3. Check if all of the boxes are ticked under the Changed selected locations section.
If yes, click OK, and then click the Close button. If not, tick all the boxes.
4. On your keyboard, press the Windows + E keys to open the File Explorer. This will
open the File Explorer on a new window.
It is easier to find your files under your user account. To open user account, go to
Windows (C:)
5. On the upper-right corner, click Search, and then enter the following extensions based on
their format:
IMAGES
.jpg,.jpeg, .png or .gif
VIDEOS
.flv,.mov,.avi,.wmv,.mp4 or .3gp
MUSIC
.mp3,.wav or.wma
MICROSOFT
WORD .doc or.docx
MICROSOFT
POWERPOINT .ppt or .pptx
MICROSOFT
EXCEL .xls or .xlsx
PDF FILE
.pdf
TEXT FILE
.txt
EXECUTABLE
PROGRAMS .exe
1. On the lower-left corner, right-click on the Windows icon, and then select Windows
PowerShell (Admin). This will open the Windows Powershell on a new window.
A pop-up confirmation window will appear. Click Yes to proceed.
2. Enter this script: set-location –path C:\ in the Windows Powershell window.
3. Enter the script for the list of all duplicates and their location:
ls "(directory you want to search)" -recurse | get-filehash | group -
property hash | where { $_.count -gt 1 } | % { $_.group } | Out-File -
FilePath "(location where you want to export the result)"
In (directory you want to search), enter the folder location of your User Account.
In (location where you want to export the result), enter the folder location you want the
result to be exported or saved (e.g. Documents or Desktop).
4. After entering the script, there would be two results that will appear:
With error:
This error message means that the searching of files is still on-going.
Without error:
By using Windows Powershell, it will search and display all of the duplicate files
regardless of their extension format (e.g. .mp3, .png or .txt).
7. Enter this script to automatically delete all duplicate files on the Windows Powershell
window:
ls "(directory you want to search)" -recurse | get-filehash | group -
property hash | where { $_.count -gt 1 } | % { $_.group | select -skip 1
} | del
In (directory you want to search), enter the folder location of your User Account.
To view all files to be deleted, you may change the del to Out-File -FilePath (in
FilePath, enter the folder location you want to export or save the result file.)