How to Force Delete a File (Files) in Windows 10?
If you fail to delete a file or folder in Windows 10, you can refer to this post for realizing why the file/folder cannot be deleted and how to force delete it.
Scenario: File deletion failed in Windows 10
“I tried to delete an unwanted file from my hard disk in Windows 10 Explorer. However, I’m told that the file is used by process and cannot be deleted. What should I do to make the file disappear? Any suggestion on force delete the file?”
Occasionally, you may encounter a folder that you are unable to delete. To resolve this issue, it is imperative that you first ascertain the cause. Let's move to why you can't delete files on your Windows.
Why some users can't delete file or folder on Windows 11/10/8/7?
This is most likely due to the fact that another program is currently attempting to access the file, even if no other programs are visible. When a file is opened by another application or process, Windows 11/10 places it in a locked state, rendering it impossible to delete, modify, or relocate it to a different location. Typically, the application will automatically unlock the file once it is no longer in use. However, this is not always the case. In some cases, the file may not unlock successfully, and a warning will be displayed if you attempt to take any action.
File or Folder in Use: The file or folder is currently being used by another program or process.
Insufficient Permissions: The user does not have the necessary permissions to delete the file or folder.
File or Folder is Read-Only: The file or folder is set to read-only.
Long File Path or Invalid Characters: The file or folder name may be too long or contain invalid characters.
System File or Folder: The file or folder may be a critical system file that Windows protects from deletion.
4 ways to force delete a file in Windows 10,11
It’s not rare to fail in deleting file. Write-protection, corrupted drive, virus infection, etc. can prevent you from removing file from hard drive, SD card, or USB flash drive. You may get a message saying that the file is in use, you have not permission to do that, or the file doesn’t exist while you can see it. Under different situations, you can take corresponding measures to fix cannot delete files issue. Or you can choose one among the three ways to force delete file or folder.
Way 1. Force delete file or folder using CMD
Command Prompt (CMD) is a command-line tool built-in Windows 10 and other Windows operating systems. It can complete many operations, including force delete file, format partition, etc. To hard delete a file using CMD, refer to the steps below:
Note: This way won’t send file to Recycle Bin and remove file directly. If you want to retrieve deleted file, you can employ data recovery software.
Step 1. Press “Windows” + ”R”, input “cmd” and hit “Enter” key to run CMD as administrator.
Step 2. In the pop-up window, type “del /f /q /a the file directory” and hit “Enter” key.
Tip: /f = delete read-only files; /q = turn off delete confirmation; /a = delete archived files and folders.
Way 2. Force delete file or folder using PowerShell
PowerShell consists of a command0line shell and associated scripting language. This tool can help you to configure systems and automate administrative tasks. You can also use it to force remove file via the following two steps:
Note: This way also won’t send file to Recycle Bin and delete files directly.
Step 1. Step 1. Press “Windows” + ”R”, input “” and click “OK” to access PowerShell interface.
Step 2. Input “Remove-Item –the file directory – force” command and press “Enter” key.
Tip: –force parameter can be sued to delete read-only or hidden files.
Way 3. Delete files in Safe Mode
Usually, when you come across a locked file, you can simply restart your device to unlock it. If it doesn't work, you can boot into Safe Mode to unlock and delete the file.
Step 1. Open "Settings" > Click on "Update & Security" > Click on "Recovery" > Under "Advanced Startup", click the "Restart now" button.
Step 2. Click on "Troubleshoot" > "Advanced options" > "Startup Settings".
Step 3. Click the "Restart" button.
Step 4. On "Startup Settings," press F4 to enable Safe Mode.
Use File Explorer to locate and delete the files that were previously locked while in Safe Mode. Then, restart your device as you would ordinarily to exit Safe Mode.
Way 4. Force delete stubborn file or folder using a file shredder
If you are a newbie in computer, you can turn to an easy-to-use and safe file shredder for Windows 10, 8, 7, AOMEI Partition Assistant Standard. It can help you to forcibly shred files or folders that cannot be deleted. Now, free download it and see how it works.
The Best Windows Disk Partition Manager and PC Optimizer
Warning: This way will remove files with zero-filling and the deleted files are hard to be recovered even using data recovery software.
Step 1. Install and run AOMEI Partition Assistant Standard. In the main interface, go to “Wipe” on the top toolbar and select “Shred Files”.
Step 2. In the pop-up window, click “Add Files” or “Add Folder” to add the files or folder that you want to delete permanently.
Step 3. Choose “Write Zero” as the shredding method. If you want to use the other three shredding ways, upgrade to the Professional version.
Step 4. Click “Shred” button to start the operation. Then, click “Yes”.
Notes:
▪ This tool is far more than a file eraser, it can complete various tasks, including zero filling hard drive, cloning HDD to HDD or SSD, check bad sector, and so on.
▪ If you are running Windows Server 2019, 2016, 2012 (R2), or 2008 (R2), you can use AOMEI Partition Assistant Server.
Bonus tips: Can I recover deleted files/folders?
We also offer additional assistance if you inadvertently delete a critical file on your Windows 11, 10, 8.1, 8, or 7 computer. Deleted files can be recovered using data recovery software that is user-friendly. My suggestion is to utilize AOMEI Partition Assistant for Recovery
What distinguishes this software and its widespread popularity?
✔ It is user-friendly and intuitive for users of all skill levels.
✔ It is compatible with all versions of Windows 11/10/8/7 and Windows Server on a variety of computer manufacturers, including Dell and HP.
✔ It can rapidly scan your computer and retrieve your deleted files with a high recovery rate.
✔ It is capable of recovering over 2000 types of data, including Word, Excel, PPT, Videos, Audios, Photos, and Emails, from a variety of storage devices, such as HDD, SSD, and USB.
✔ It is capable of restoring files from a variety of sources, including accidental or intentional deletion, temporary or permanent deletion, and power failure.
Ending lines
If you can't force delete file, try the methods from this post, you may easily fix this problem. Make sure you delete right files, otherwise you'll need to recover it later. AOMEI Partition Assistant is a versatile tool for Windows users, it can help you fix many issues such as drive space management, wipe data, clean juck files...