为了优化系统存储空间(system storage space),您需要经常删除系统中不必要的文件。这有助于提高操作系统的速度和(operating system)性能(speed and performance)。但是,您可能意识到您无法在Windows 10中删除(Windows 10)文件或文件夹(file or folder)。无论您按多少次 Delete 键( press the Delete key)或将其拖到回收站(drag it to the Recycle Bin),您都可能遇到拒绝删除的文件。您可能会收到类似Item Not Found、Could not find this item和Location is available等通知(Location is unavailable)删除某些文件或文件夹时出错。因此,如果您也遇到此问题,我们将向您展示如何在Windows 10中强制删除文件。
如何在 Windows 10 中强制删除文件(How to Force Delete File in Windows 10)
注意:(Note:)请记住,Windows操作系统文件受到保护,不会被删除( operating system files are protected against deletion),因为这样做可能会导致操作系统(operating system)出现问题。因此,请确保您没有删除任何这些文件。万一(case something)出现问题,应提前准备好系统备份(system backup should be prepared)。
为什么您无法在 Windows 10 中删除文件?(Why You Cannot Delete Files in Windows 10?)
这些是您无法在Windows 10(Windows 10)中删除文件或文件夹的可能原因:
- 该文件当前在系统中打开。
- 文件或文件夹(file or folder)具有只读属性(attribute i.e),即. 它是写保护的。
- 损坏的文件或文件夹
- 损坏的硬盘。
- 删除权限不足。
- 如果您尝试从已安装的外部设备中删除(mounted external device)文件或文件夹(file or folder),则会出现拒绝访问( Access Denied)消息。
- 已填充回收站(Recycle Bin):在桌面屏幕上(Desktop screen),右键单击回收站(Recycle Bin )并选择清空回收站(Empty Recycle Bin)选项,如图所示。
基本故障排除(Basic Troubleshooting)
执行以下基本故障排除步骤可轻松解决此问题:
-
关闭(Close all programs)PC 上运行的所有程序。
-
重新启动您的电脑(Restart your PC)。
-
扫描您的计算机(Scan your computer)以查找病毒/恶意软件并将其删除。
Method 1: Close File/Folder Processes in Task Manager
不能删除在任何程序中打开的文件。我们将尝试使用任务管理器结束(Task Manager)Microsoft Work等文件进程(file process),如下:
1. 右击任务栏(Taskbar),选择任务管理器(Task Manager),如图。
2. 选择Microsoft Word并单击End Task,如突出显示的那样。
3. 然后,再次尝试删除.docx 文件(.docx File)。
注意:(Note:)您可以对要删除的任何类型的文件执行相同的过程。
另请阅读:(Also Read:)如何在 Windows 10 中结束任务
方法 2:更改文件或文件夹的所有权(Method 2: Change Ownership of File or Folder)
以下是如何通过更改文件或文件夹(file or folder)的所有权来强制删除Windows 10中的文件:
1. 右键单击要删除的文件,然后单击(File)属性(Properties),如下图所示。
2. 单击安全(Security )选项卡下的高级(Advanced )。
3. 单击所有者(Owner)名称旁边的更改。(Change)
注意:(Note:)在某些情况下,系统(System)被列为所有者,而在其他情况下;受信任(TrustedInstaller)的安装程序。
4.在输入要选择的对象名称(Enter the object name to select)字段中输入用户名。(username)
5. 单击检查名称(Check Names)。识别名称后,单击OK。
您会注意到所有者名称(Owner name)已更改为您提供的用户名。(username )
6. 选中标记为替换子容器和对象的所有者(Replace owner on subcontainers and objects)的框,然后单击应用(Apply)。然后,重新启动您的 Windows 10 电脑。
7. 再次,按照步骤 1(steps 1) – 2导航到文件夹的高级安全设置(Advanced Security Setting)。
8. 在权限(Permissions)选项卡下,选中标题为将所有子对象权限条目替换为此对象的可继承权限条目(Replace all child object permission entries with inheritable permission entries from this object )的框,突出显示。单击确定(OK)并关闭窗口。
9. 返回文件夹属性(Folder Properties)窗口。单击安全(Security )选项卡下的编辑(Edit)。
10. 在Permissions for <username>窗口中,选中 完全控制(Full Control)选项并单击( click) 确定(OK)。
11.在文件资源管理器中打开文件或文件夹,(file or folder)然后按(File Explorer and press) Shift + Delete keys将其永久删除。
Method 3: Delete File/Folder Through Command Prompt
大多数时候,使用简单的命令行来做事会更快更容易。以下是在Windows 10(Windows 10)中强制删除文件的方法:
1. 按Windows 键(Windows key),键入命令提示符(Command Prompt)并单击以管理员身份运行(Run as administrator),如图所示。
2.输入del,后跟要删除的文件夹或文件的( file )路径,然后按(path of the folder )Enter。
例如,我们描述了从 C 盘删除(deletion command)名为 Armed(text file named Armed from C drive)的文本文件的命令。
注意:(Note:)如果您不记得文件的确切名称,请键入tree /f命令。您将在此处看到所有嵌套文件和文件夹的树。
确定所需文件或文件夹(file or folder)的路径后,执行步骤 2(Step 2)将其删除。
另请阅读:(Also Read:) 修复命令提示符(Fix Command Prompt Appears)在 Windows 10 上出现然后消失
方法 4: 修复损坏的系统文件和硬盘中的坏扇区(Method 4: Repair Corrupt System Files & Bad Sectors in Hard Disk)
方法 4A:使用 chkdsk 命令(Method 4A: Use chkdsk Command)
检查磁盘命令(Check Disk command)用于扫描硬盘驱动器(Hard Disk Drive)上的坏扇区并在可能的情况下修复它们。硬盘中的(HDD)坏(Bad)扇区可能导致Windows无法读取重要的系统文件,从而导致您无法删除Windows 10中的文件夹问题(folder issue)。
1. 单击 开始(Start) 并键入 cmd。然后,单击 Run as Administrator,如图所示。
2.在“ 用户帐户控制(User Account Control) ”对话框中单击“ 是”进行确认。(Yes)
3. 键入 chkdsk X: /f 其中X代表 您要扫描的驱动器分区 。(drive partition )按Enter执行。
4. 如果正在使用驱动器分区(drive partition),可能会提示您在下次启动期间安排扫描。在这种情况下,按 Y 并按 Enter 键。
方法 4B:使用 DISM 和 SFC 扫描修复损坏的系统文件
(Method 4B: Fix Corrupt System Files using DISM & SFC Scans
)
损坏的系统(Corrupt system)文件也可能导致此问题。因此(Hence),运行部署映像服务和管理(Deployment Image Servicing & Management)以及系统文件检查器(System File Checker)命令应该会有所帮助。运行这些扫描后,您将能够在Windows 10中强制删除文件。
注意:(Note:)为了获得更好的效果,建议在执行SFC(SFC command)命令之前运行DISM命令。(DISM)
1.使用管理权限(Command Prompt with administrative privileges)启动 命令提示符, 如 方法 4A(Method 4A)所示。
2. 在这里,一个接一个地键入给定的命令,然后按 Enter 键执行这些命令。
DISM.exe /Online /Cleanup-image /Checkhealth
DISM.exe /Online /Cleanup-image /Scanhealth
DISM.exe /Online /Cleanup-image /Restorehealth
3. 键入 sfc /scannow 并按 Enter 键(Enter)。让扫描完成。
Verification 100% complete 消息,重新启动您的 PC 。
方法 4C:重建主引导记录(Method 4C: Rebuild Master Boot Record)
由于硬盘(Hard drive)扇区损坏,Windows 操作系统(Windows OS)无法正常启动,导致Windows 10中的文件夹无法删除问题。要解决此问题,请执行以下步骤:
1. 重新启动(Restart) 计算机,同时按住 Shift 键进入 高级启动(Advanced Startup) 菜单。
2. 在这里,点击 疑难解答(Troubleshoot),如图所示。
3. 然后,点击 高级选项(Advanced options)。
4. 从可用选项列表中选择命令提示符。(Command Prompt)计算机将再次启动。
5. 从帐户列表中,选择 您的用户帐户(your User Account)并 在下一页 输入 您的密码。(your Password)点击 继续(Continue)。
6 、一一执行以下 命令 。(commands )
bootrec.exe /fixmbr
bootrec.exe /fixboot
bcdedit /export X:\bcdbackup
attrib X:\boot\bcd -h -r -s
ren X:\boot\bcd bcd.old
bootrec /rebuildbcd
注 1(Note 1):在命令中, X 代表 您要扫描的驱动器分区。(drive partition)
注意 2(Note 2): 当询问是否允许将安装添加到引导列表时,键入(boot list)Y 并按 Enter 键(Enter key)。
7. 现在,键入 exit 并按 Enter。 点击 继续(Continue) 正常启动。
在此过程之后,您将能够在Windows 10中强制删除文件。
另请阅读:(Also Read:)什么是 Windows 10 启动管理器?
方法 5:启用隐藏管理员帐户(Method 5: Enable Hidden Administrator account)
Windows 10 包含一个内置管理员帐户(Administrator account),默认情况下,出于安全原因,该帐户处于隐藏和禁用状态。有时,您需要启用此隐藏的管理员访问权限(administrator access)来解决此问题:
1. 按照方法 3(Method 3)中的说明启动命令提示符(Command Prompt)。
2. 键入命令:net user以获取所有用户帐户的列表。
3. 现在,执行命令:net user administrator /active:yes。
4. 收到命令成功完成(command completed successfully )消息后,(, )输入给定命令并按Enter 键(Enter):
net user administrator
如图所示, Account Active(Account Active)的值应为Yes。如果是,您将能够轻松删除文件和文件夹。
方法6:在安全模式下删除文件(Method 6: Delete Files in Safe Mode)
这只是一种解决方法,但如果您只需要从某个目录中删除几个文件或文件夹,它可能会派上用场。
1. 同时按下Windows + R 键(keys)启动运行对话框(Run Dialog Box)。
2. 在这里,输入msconfig并按Enter。
3. 切换到启动( Boot )选项卡。
4. 选中安全启动(Safe Boot)框并单击Apply > OK以保存更改。
5.进入安全模式后(Safe Mode)删除(Delete)文件、文件夹或目录(folder or directory)。
6. 然后,取消选中步骤 4(Step 4)中标记的框并正常启动以继续工作。
另请阅读:(Also Read:)如何删除无法删除的文件或文件夹
方法 7:扫描病毒和威胁(Method 7: Scan for Viruses & Threats)
您要删除的文件可能感染了恶意软件或病毒(malware or viruses),导致无法删除Windows 10问题中的文件。因此,您应该扫描导致问题的文件或文件夹(file or folder),如下所示:
1.在Windows 搜索( Windows search)栏中键入并搜索病毒和威胁防护。(Virus & threat protection)点击打开(Open),如图。
2. 在这里,单击扫描选项(Scan options)。
3. 选择全面扫描 (Full scan )并点击 立即扫描(Scan now)。
注意: (Note: )完整扫描通常需要更长的时间才能完成,因为它是一个彻底的过程。因此(Hence),请在非工作时间这样做。
4.等待(Wait)扫描过程(scanning process)完成。
注意: (Note: )您可以最小化(minimize)扫描窗口并进行日常工作,因为它将在后台运行。
5.恶意软件(Malware)将列在当前威胁(Current threats) 部分下。因此,单击 开始操作(Start actions) 以删除这些。
删除恶意软件后,您可以在Windows 10(Windows 10)中强制删除文件。
方法 8:移除第三方防病毒干扰(如果适用)(Method 8: Remove Third-Party Antivirus Interference (If Applicable))
许多防病毒程序都包含文件保护功能(file-protection function),因此恶意应用程序和用户无法删除您的数据。虽然此功能很方便,但它也可能会阻止您删除某些文件。因此,要解决(Hence)Windows 10(folder Windows 10)无法删除文件夹的问题,
- 禁用防病毒应用程序(antivirus app)中的文件保护设置(file-protection setting)。
- 或者,禁用 PC 上的防病毒程序。
- 或者,从您的计算机上卸载防病毒软件。(Antivirus)在此处阅读在Windows 10中完全卸载 Avast Antivirus(Completely Uninstall Avast Antivirus)的5种方法(Ways)。
常见问题 (FAQ)(Frequently Asked Questions (FAQs))
Q1。如何强制删除文件夹?(Q1. How do you force delete a folder?)
答。(Ans. )您应该首先删除构成其内容的文件。然后可以轻松删除空文件夹。
Q2。如何摆脱无法删除的桌面图标?(Q2. How can I get rid of desktop icons that cannot be deleted?)
答。(Ans. )如果您无法从桌面上删除图标,您可以使用Windows 自定义(Windows customization)选项。
Q3。我可以删除 Aow_drv 吗?(Q3. Can I delete Aow_drv?)
答。(Ans. )不,无论您多么努力,都无法删除Aow_drv 。这是您无法删除的日志文件(log file that you cannot remove)。
推荐的:(Recommended:)
- 什么是 WinZip?
- 如何删除Google Drive中的重复文件(Duplicate Files)
- 如何在Windows 10中(Windows 10)删除临时文件(Delete Temp Files)
- 如何在Windows 10中(Windows 10)删除 Win 安装文件(Delete Win Setup Files)
我们希望您发现本教程对如何在Windows 10中强制删除文件很有用。请(Please)告诉我们哪种方法最适合您。在下面的评论部分分享任何问题或建议。
How to Force Delete File in Windows 10
For optimizing system storage space, yoυ need to delete unnecessary filеs іn your system frequеntly. This helps to improνe the speed аnd performance of the operating system. However, you may realіze that you cannot deletе file or folder in Windows 10. You may come across a file that refuses to erasе no matter how many times you press the Delete key or drag it to the Recycle Bin. You may get notifications like Item Not Found, Could not find this item, and Location is unavailable errors while deleting certain files or folders. So, if you too encountered this problem, we will show you how to force delete file in Windows 10.
How to Force Delete File in Windows 10
Note: Keep in mind that Windows operating system files are protected against deletion since doing so might create problems with the operating system. So be sure that you are not deleting any of these files. In case something goes wrong, a system backup should be prepared, in advance.
Why You Cannot Delete Files in Windows 10?
These are the possible reasons why you cannot delete files or folder in Windows 10:
- The file is currently open in the system.
- The file or folder has a read-only attribute i.e. it is write-protected.
- Corrupt File or Folder
- Corrupt Hard drive.
- Insufficient permission to erase.
- If you attempt to remove a file or folder from a mounted external device, an Access Denied message will appear.
- Filled Recycle Bin: On the Desktop screen, right-click on Recycle Bin and choose Empty Recycle Bin option, as shown.
Basic Troubleshooting
Perform these basic troubleshooting steps for an easy fix to this problem:
-
Close all programs running on your PC.
-
Restart your PC.
-
Scan your computer to find viruses/malware and remove it.
Method 1: Close File/Folder Processes in Task Manager
A file that is open in any program cannot be deleted. We will try ending the file process such as Microsoft Work using Task Manager, as follows:
1. Right-click on the Taskbar and select Task Manager, as shown.
2. Select Microsoft Word and click on End Task, as highlighted.
3. Then, try deleting the .docx File again.
Note: You can follow the same process for any type of file that you wish to delete.
Also Read: How to End Task in Windows 10
Method 2: Change Ownership of File or Folder
Here’s how to force delete file in Windows 10 by changing the ownership of that file or folder:
1. Right-click on the File you want to delete and click on Properties, as depicted below.
2. Click on Advanced under the Security tab.
3. Click on Change next to the Owner name.
Note: In some situations, System is listed as the owner, while in others; TrustedInstaller.
4. Enter the username in the Enter the object name to select field.
5. Click on Check Names. When the name is recognized, click on OK.
You will notice that the Owner name has changed to the username you provided.
6. Check the box marked Replace owner on subcontainers and objects and click Apply. Then, restart your Windows 10 PC.
7. Again, navigate to Advanced Security Setting for the folder by following steps 1–2.
8. Under Permissions tab, check the box titled Replace all child object permission entries with inheritable permission entries from this object shown highlighted. Click on OK and close the window.
9. Return to the Folder Properties window. Click on Edit under Security tab.
10. In the Permissions for <username> window, check Full Control option and click OK.
11. Open the file or folder in File Explorer and press Shift + Delete keys to delete it permanently.
Method 3: Delete File/Folder Through Command Prompt
Most times, it is just faster and easier to do things with simple command lines. Here’s how to force delete file in Windows 10:
1. Press the Windows key, type Command Prompt and click on Run as administrator, as shown.
2. Type del, followed by the path of the folder or file you wish to remove, and hit Enter.
For example, we have depicted deletion command for text file named Armed from C drive.
Note: If you do not remember the exact name of the file, type tree /f command. You will see a tree of all nested files and folders here.
Once you determine the path for desired file or folder, implement Step 2 to delete it.
Also Read: Fix Command Prompt Appears then Disappears on Windows 10
Method 4: Repair Corrupt System Files & Bad Sectors in Hard Disk
Method 4A: Use chkdsk Command
Check Disk command is used to scan for bad sectors on the Hard Disk Drive and repair them, if possible. Bad sectors in HDD can result in Windows being unable to read important system files resulting in you can’t delete folder issue in Windows 10.
1. Click on Start and type cmd. Then, click on Run as Administrator, as shown.
2. Click on Yes in the User Account Control dialog box to confirm.
3. Type chkdsk X: /f where X represents the drive partition that you want to scan. Hit Enter to execute.
4. You might get prompted to schedule the scan during the next boot in case the drive partition is being used. In this case, press Y and press the Enter key.
Method 4B: Fix Corrupt System Files using DISM & SFC Scans
Corrupt system files can also result in this issue. Hence, running Deployment Image Servicing & Management and System File Checker commands should help. After running these scans you will be able to force delete file in Windows 10.
Note: It is advisable to run DISM commands before executing SFC command in order to achieve better results.
1. Launch Command Prompt with administrative privileges as shown in Method 4A.
2. Here, type the given commands, one after the other, and press Enter key to execute these.
DISM.exe /Online /Cleanup-image /Checkhealth
DISM.exe /Online /Cleanup-image /Scanhealth
DISM.exe /Online /Cleanup-image /Restorehealth
3. Type sfc /scannow and hit Enter. Let the scan be completed.
4. Restart your PC once Verification 100% complete message is displayed.
Method 4C: Rebuild Master Boot Record
Due to corrupt Hard drive sectors, Windows OS is not able to boot properly resulting in can’t delete folder in Windows 10 issue. To fix this, follow these steps:
1. Restart your computer while pressing the Shift key to enter the Advanced Startup menu.
2. Here, click on Troubleshoot, as shown.
3. Then, click on Advanced options.
4. Choose Command Prompt from the list of available options. The computer will boot once again.
5. From the list of accounts, choose your User Account and enter your Password on the next page. Click on Continue.
6. Execute the following commands one by one.
bootrec.exe /fixmbr
bootrec.exe /fixboot
bcdedit /export X:\bcdbackup
attrib X:\boot\bcd -h -r -s
ren X:\boot\bcd bcd.old
bootrec /rebuildbcd
Note 1: In the commands, X represents the drive partition that you want to scan.
Note 2: Type Y and press Enter key when asked for permission to add installation to the boot list.
7. Now, type exit and hit Enter. Click on Continue to boot normally.
After this process, you will be able to force delete file in Windows 10.
Also Read:What is Windows 10 Boot Manager?
Method 5: Enable Hidden Administrator account
Windows 10 includes a built-in Administrator account that, by default, is hidden and disabled for security reasons. Sometimes, you need to enable this hidden administrator access to solve this problem:
1. Launch Command Prompt as instructed in Method 3.
2. Type the command: net user to get a list of all user accounts.
3. Now, execute the command: net user administrator /active:yes.
4. Once you receive command completed successfully message, type given command and hit Enter:
net user administrator
The value for Account Active filed should be Yes, as shown. If it is, you will be able to delete files and folders with ease.
Method 6: Delete Files in Safe Mode
This is only a workaround, but it could come in handy if you only need to remove a few files or folders from a certain directory.
1. Press Windows + R keys together to launch the Run Dialog Box.
2. Here, type msconfig and hit Enter.
3. Switch to the Boot tab.
4. Check the box Safe Boot and click on Apply > OK to save changes.
5. Delete the file, folder or directory once you have entered Safe Mode.
6. Then, uncheck the boxes marked in Step 4 and boot normally to continue working.
Also Read: How to delete files or folders which cannot be deleted
Method 7: Scan for Viruses & Threats
The files which you want to delete can be infected with malware or viruses which results in cannot delete files in Windows 10 issue. So, you should scan the problem-causing file or folder, as follows:
1. Type and search Virus & threat protection in Windows search bar. Click on Open, as shown.
2. Here, click Scan options.
3. Select Full scan and click on Scan now.
Note: Full scan generally takes longer to complete because it is a thorough process. Hence, do so during your non-working hours.
4. Wait for the scanning process to complete.
Note: You can minimize the scan window and do your usual work as it will run in the background.
5. Malware will be listed under the Current threats section. Thus, click on Start actions to remove these.
After removing malware, you can force delete file in Windows 10.
Method 8: Remove Third-Party Antivirus Interference (If Applicable)
Many antivirus programs include a file-protection function so that malicious apps and users cannot erase your data. While this functionality is convenient, it might also prevent you from deleting some files. Hence, to resolve the cannot delete folder Windows 10 issue,
Frequently Asked Questions (FAQs)
Q1. How do you force delete a folder?
Ans. You should start by removing the files that make up its content. The empty folder can then be deleted easily.
Q2. How can I get rid of desktop icons that cannot be deleted?
Ans. If you are unable to remove an icon from your desktop, you can use Windows customization options.
Q3. Can I delete Aow_drv?
Ans. No, you cannot remove Aow_drv no matter how hard you try. This is a log file that you cannot remove.
Recommended:
We hope you found this tutorial useful for how to force delete file in Windows 10. Please tell us which approach worked best for you. Share any questions or suggestions in the comments section below.