Situatie
Duplicate files occupy unnecessary space in your computer hence slowing it down. These files are copies of already existing files on your device. You may have file duplicates of photos, videos, audios, archives, documents, etc.
Solutie
Pasi de urmat
Right-click on the “Start” button, and on the list of features that appear, select “Windows PowerShell (Admin)”
Paste the command below to set the location path to your main drive. Press “Enter” to run the command.
set-location –path C:\
Paste the command below and replace the “search folder” and “location folder” with the actual folders on your computer. Next, press the “Enter” button.
ls “(search folder)” -recurse | get-filehash | group -property hash | where { $_.count -gt 1 } | % { $_.group } | Out-File -FilePath “(location folder)
The above process will take some time to complete (depending on the number of files in the search folder). When it finishes, open the results file (.txt file) to identify the location of the duplicate files and manually delete them.
You can paste the command below to delete the duplicates automatically. Ensure you replace the “search folder” with your actual folder name.
ls “(search folder)” -recurse | get-filehash | group -property hash | where { $_.count -gt 1 } | % { $_.group | select -skip 1 } | del
Leave A Comment?