Rumah  >  Artikel  >  Tutorial sistem  >  Cara Cari dan Padam Fail Pendua dalam Windows 10 Menggunakan CMD

Cara Cari dan Padam Fail Pendua dalam Windows 10 Menggunakan CMD

WBOY
WBOYasal
2024-08-02 10:07:03716semak imbas

"Hi. My laptop is running slow at times. It takes a minute to boot up and it'll freeze up at times on a webpage. When I try to close the page it doesn't close immediately. I know I have duplicate folders. The issue I'm having is how to identify and delete the RIGHT duplicate files/folders without trashing my laptop. Could someone help me with this? Thanks."

If you have multiple duplicate folders/files on your Windows Computer and want to remove those duplicates, using command can be a good choice. This article will show you how to find and delete duplicate files in Windows 10 using cmd so as to free up and speed up your Laptop/PC.

How to Find and Delete Duplicate Files in Windows 10 Using CMD

  • Part 1: Find and Delete Duplicate Files Using CMD in Command Prompt
  • Part 2: Find and Delete duplicate files using CMD in Windows PowerShell
  • Part 3: Easier and Safer Way to Find and Delete Duplicate Files

1. Find and Delete Duplicate Files Using CMD in Command Prompt

There are various commands that can help you find and remove duplicate files on Windows. Now, let's see one of them. First of all, press Win +Q and enter cmd in search bar. Next, right-click on Command Prompt and run it as an administrator. Then follow the steps as below.

How to Find duplicate files using cmd

Step 1: In Command Prompt window, type cd /d folder path and press Enter.  Before entering the command, locate the folder you want to scan for duplicate files and copy the file path. Then replace folder path with the copied file path.

How to Find and Delete Duplicate Files in Windows 10 Using CMD

Step 3:  Type dir /s /b *.extension and press Enter. Then you will find that the duplicate files are listed in the Command window. Before entering the command, replace extension with the extension of duplicate file you are looking for.

How to Find and Delete Duplicate Files in Windows 10 Using CMD

How to delete duplicate files using cmd

It is worth noting that if you delete duplicate files using del command, the files will be removed from your disk and cannot be retrieved from recycle bin. Now, please follow these steps.

Step 1: In Command Window, set specific location using cmd as step 1 of finding duplicate files.

Step 2: Enter del “* – Copy.png” and hit Enter. Change -Copy.png  into the real file suffix and extension before entering the command. For example, if you want to delete duplicate file with -1 .txt suffix and extension, you need to enter del “* – 1. txt”

How to Find and Delete Duplicate Files in Windows 10 Using CMD

After that, you can delete those unnecessary duplicate files with the same extension successfully.

2. Find and Delete duplicate files using CMD in PowerShell

In addition to Command Prompt, Windows PowerShell also allows you to automatically find and remove duplicate files using cmd. Here come the steps.

Step 1: Right-click on Start menu and choose Windows PowerShell (Admin) to run Windows PowerShell as administrator.

How to Find and Delete Duplicate Files in Windows 10 Using CMD

Step 2: Once PowerShell window pops up, enter set-location –path C: and hit Enter.

Note: Before entering command, replace C: with the drive you want to find duplicate files.

How to Find and Delete Duplicate Files in Windows 10 Using CMD

步骤 3:要在 Windows PowerShell 中使用 cmd 查找重复文件,请输入以下命令并按Enter。

ls“扫描文件夹”-recurse |获取文件哈希 |组属性哈希 |其中 { $_.count -gt 1 } | % { $_.group } | Out-File -FilePath“扫描结果位置”

注意:这里扫描文件夹需要更改为特定文件夹,扫描结果位置需要更改为您要导出重复文件列表的路径。

How to Find and Delete Duplicate Files in Windows 10 Using CMD

如上所述,该命令会创建一个重复文件列表,您可以根据列表中显示的文件路径删除重复文件。

How to Find and Delete Duplicate Files in Windows 10 Using CMD

第4步:要使用cmd自动删除重复文件,请输入以下命令并按

Enter键。

ls“搜索文件夹”-recurse |获取文件哈希 |组属性哈希 |其中 { $_.count -gt 1 } | % { $_.group |选择-跳过 1 } | 德尔

注意:请将

搜索文件夹替换为具体文件夹路径。

How to Find and Delete Duplicate Files in Windows 10 Using CMD

3.查找和删除重复文件的更简单、更安全的方法

与在Windows上使用cmd查找和删除重复文件相比,使用专业的重复文件查找器似乎要容易得多。在这里你绝对应该尝试一下

iSumsoft DupFile Refixer。 iSumsoft DupFile Refixer 是一个有用且可靠的工具,旨在自动检测和整理 Windows 上所有格式的重复文件。此外,它可以帮助您一次批量删除不同文件/文件夹中的所有重复文件。

让我们在 Windows 上安装 iSumsoft DupFile Refixer 并了解如何在不使用 cmd 的情况下查找和删除重复文件。

下载

第1步:安装后启动此重复文件查找器,然后单击

添加图标选择扫描文件夹/驱动器。

How to Find and Delete Duplicate Files in Windows 10 Using CMD

第2步:将所需的驱动器/文件夹添加到扫描目录后,单击

开始扫描以自动检查重复文件。

How to Find and Delete Duplicate Files in Windows 10 Using CMD

步骤3:扫描完成后,iSumsoft DupFile Refixer 将创建一个扫描报告,显示所有重复文件的文件名、扩展名、大小和日期。通过单击

文件名框,您可以轻松批量删除所有重复文件。如果您想查看有关重复文件的更多详细信息,只需右键单击它并选择打开文件位置。

How to Find and Delete Duplicate Files in Windows 10 Using CMD

额外提示

iSumsoft DupFile Refixer 允许您通过单击主页上的

设置来自定义扫描设置以过滤扫描项目。

1.您可以勾选

所有类型来扫描各种重复文件,包括图片、视频、音频等。

2.您可以输入最小大小和最大大小来扫描特定大小的重复文件。

3.扫描时可以跳过隐藏文件、系统文件、程序文件和回收站中的文件。

设置完成后,点击

确定保存设置

How to Find and Delete Duplicate Files in Windows 10 Using CMD

Barisan Bawah

Menggunakan Command ialah pilihan yang baik untuk mencari dan mengalih keluar fail pendua pada Komputer Windows anda. Tetapi jika anda mencari cara yang lebih mudah dan selamat, adalah disyorkan untuk menggunakan pencari fail pendua yang berkesan dan mudah digunakan seperti iSumsoft DupFile Refixer yang boleh membantu anda mengetahui dengan tepat dan memadam fail pendua pada Windows dengan cepat.

Atas ialah kandungan terperinci Cara Cari dan Padam Fail Pendua dalam Windows 10 Menggunakan CMD. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!

Kenyataan:
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn