How Can I Delete Duplicate Files in a Folder?

Some users may want to know “How can I delete duplicate files in a folder” when they find large duplicate files take up too much space on the disk. If you also want to clean redundant files, then this page will offer you some help.

Posted by @Lucas July 24, 2024 Updated By @Lucas October 30, 2023

Duplicate files can clutter your computer and consume valuable disk space, making it essential to remove them periodically. These files are duplicates of files that already exist on your device. You may have duplicate files of images, movies, audios, archives, documents, and so on.

The easiest approach to deal with such files is to locate and delete them from your computer. So, in this article, we will explore 3 methods to help you delete duplicate files in a folder on Windows.

How to use Windows 10 tools to delete duplicate files

Your Windows 10 PC comes equipped with native utilities designed to efficiently eliminate duplicate files. Given that these duplicate files consume unnecessary storage space, it is advisable to utilize these built-in tools for locating and eradicating them. Doing so not only frees up space but also contributes to the long-term performance optimization of your computer.

The primary built-in utilities at your disposal for removing duplicate files on Windows 10 include File Explorer and Windows PowerShell. The following instructions outline how to employ each of these tools effectively.

Tool 1. File Explorer

To get started using File Explorer on your Windows 10 machine, follow these steps:

Step 1. Press the "Start" button and enter "indexing options." Then, select the app from the search results.

Step 2. Click on the “Modify” button. On the next window that opens, click on “Show all locations.”

Step 3. Check all the boxes and click “OK.”

Step 4. Start “File Explorer” by pressing the “Windows” key + “E.” Now, access your Windows user profile by going to This PC > Local Disk (C:) > Users.

Step 5. Apply the following changes to sort your files:

Click the “View” menu and tap on the “Preview pane.” This gives you a preview of all the files you want to select. Navigate to the “Layout” section and select “Details." On the “Current View” section, click “Group by.” Next, select “Name” and check “Ascending.” Check for duplicate files on the File Explorer Window by typing the extensions you want to delete on the “Search” tab.

Watch out for the file names, dates modified, and sizes. If you find a duplicate, click on it and hit the “Delete” button.

Here, you can check file formats for searching.

Tool 2. PowerShell

Step 1. On the lower-left corner, right-click on the Windows icon, and then select Windows PowerShell (Admin). A pop-up confirmation window will appear. Click Yes to proceed.

Step 2. Enter this script: set-location –path C:\ in the Windows PowerShell window.

Step 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).

Step 4. Open the folder location you have exported or saved.

Step 5. Check for each location in the text file, and then delete the duplicate files.

Also, you can run commands to automatically remove duplicate files. 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

How can I delete duplicate files in a folder? [easier way]

You can use Windows built-in tools to delete duplicate files in a folder but the operations are not convenient, especially to use commands to remove files. In this case, using third-party software to remove duplicate files on Windows 10 is a great alternative to inbuilt tools.

If you're looking for a more efficient and feature-rich solution to manage duplicate files, AOMEI Partition Assistant Professional is an excellent choice. This versatile software is not limited to duplicate file removal; it also offers comprehensive disk management tools, ensuring your computer's storage remains optimized.

★ Key Features: Duplicate File Finder: AOMEI Partition Assistant Professional comes with a built-in Duplicate File Finder that quickly identifies and removes duplicate files in your selected folder or drive, saving you valuable time and disk space. Disk Optimization: Beyond duplicate file removal, this software allows you to optimize your entire disk. You can reallocate disk space, extend or shrink partitions, and perform other essential disk management tasks with ease. User-Friendly Interface: AOMEI's intuitive interface ensures that users of all technical levels can navigate the software effortlessly.
Free DownloadWin 11/10/8.1/8/7/XP
Secure Download

 Step 1. Click the "Free up" on the main tab and select "Duplicate Files Finder".

Step 2. Here, all the partitions on the computer are displayed. You can click the drive that stores your target folder and find it to only scan the fodler.

Click on "Scan" to start scanning. Also, if the partition is locked, the program will still scan it and display duplicate files on the partition. However, it cannot delete duplicate files on locked drives.

Step 3. After the process is finished, all duplicate files that meet the conditions you set will be displayed. You can click the "Preview" to see the duplicate files.

Step 4. You can select the duplicate files you want to delete. Or, click "Smart Select" to automatically select duplicate files. Then, click "Move to folder".

Final lines

How can I delete duplicate files in a folder? In this article, we explored three methods to delete duplicate files in a folder on Windows 10 to help you solve this problem. Windows File Explorer and PowerShell offer built-in solutions that can help you manually identify and remove duplicates.

However, for a more efficient and user-friendly experience, consider using AOMEI Partition Assistant Professional. Its powerful features and intuitive interface make it a valuable addition to your toolkit for managing disk space and keeping your computer organized. Choose the method that suits your needs best and enjoy a clutter-free computing experience.