Fix : Cannot Delete a File or Folder in Windows 11

Many windows users have encountered a issue saying they cannot delete a file or folder on their windows system and no matter what they do or how many times they try, they are not able to delete it.


ADVERTISEMENT

Reasons for this issue could be one of the following given below :

  • File or Folder Corruption
  • File or Folder is in use by other process or application.
  • File or Folder is either open or running in background.
  • File or Folder is Read-only.
  • May be Recycle Bin is full and there is no space for more items to hold.
  • Disk Corruption.
  • The file or folder could be system file or folder.

If you are also encountering such a problem and not being able to delete a file or folder, then do not panic. We have compiled this issue and come up with a few possible ways to delete the file or folder on your windows 11 system.

 

How to Force Delete a File Using Del Command

 

Step 1: Press Windows + R keys together on your keyboard to open Run dialog box.


ADVERTISEMENT


Step 2: Type cmd in the run box and hit the CTRL + SHIFT + ENTER keys together to open Command Prompt as admin.

Step 3: Click Yes in the UAC prompt to continue.

 

3 Run Cmd Optimized

 

Step 4: Right click on the file which you want to delete.

Step 5: Click Properties from the context menu as shown below.

 

Properties Test File 11zon

 


ADVERTISEMENT

Step 6: In the file Properties window, make note of the Location where the file is stored and click OK button to close the properties window.

 

Test File Properties Location 11zon

 

Step 7: Modify and then, copy & paste the below command in the command prompt.

DEL /F /Q /A "C:\Users\%username%\Desktop\Testing purpose\test file.txt"

NOTE:- Replace “ C:\Users\%username%\Desktop\Testing purpose\ ” with the location path of the file on your system which you want to delete and replace ” test file.txt ” with the file name along with the type of extension.

Step 8: Hit the Enter key to execute the command to delete the file.

 

File Delete Command 11zon

 

Step 9: Now, Close the Command Prompt window.

This is how one can force delete a file on the windows 11 system.

 

How to Force Delete a Folder and all the subfolders inside

The del command used above only deletes the files and keep the directory structure intact and undeleted. But, if you want to completely delete all tyhe directories and subdirectories inside a folder, then you should use rd command. Let us see how.

Step 1: Press Windows + R keys together on your keyboard to open Run dialog box.

Step 2: Type cmd in the run box and hit the CTRL + SHIFT + ENTER keys together to open Command Prompt as admin.

Step 3: Click Yes in the UAC prompt to continue.

 

3 Run Cmd Optimized

 

Step 4: Right click on the folder which you want to delete from your system and click Properties from the context menu as shown below.

 

Folder Properties 11zon

 

Step 5: Copy the Location path of the folder and click OK to close.

 

Folder Location 11zon

 

Step 6: Copy and Paste the below command and press Enter key to execute the command.

RD /S /Q "C:\Users\%username%\Desktop\Testing purpose\Test folder"

NOTE: Replace C:\Users\%username%\Desktop\Testing purpose with the location path of the folder that you want to delete from your system and replace Test folder with the folder name. Make sure the path is inside the inverted commas in the command.

 

Delete Folder Command 11zon

 

Step 7: After executing this command, you will see that the folder gets deleted.

This way one can delete a folder on their windows 11 system using command prompt.

 

How to Force Delete the file or folder permanently

 

Step 1: Close all the applications, folders and files that are open on the system.

Step 2: After you have close everything, Open Task Manager by pressing CTRL + SHIFT + ESC keys together on your keyboard.

Step 3: In the Task Manager window, Make sure you are in the Processes tab.

Step 4: Then, Right click on any application if they are present below and select End task from the context menu as shown.

 

Task Manager End Task 11zon

 

Step 5: Close the Task Manager after making sure everything is closed on your system.

Step 6: Now, go to the file or folder and select it and press SHIFT + DELETE keys together on your keyboard.

Step 7: Click Yes on the confirm window of Delete file or folder as shown below.

 

Yes Confirm Delete Permanently 11zon


ADVERTISEMENT

 

This will delete your file or folder permanently from your system.

That’s all.

 

Delete the file or folder in Windows 11 Safe Mode

Sometimes some files and folders give trouble saying access denied when any user tries to delete them. So, trying to delete them in safe mode is the best solution and you can easily do it by following these steps given below.

 

Step 1: Start your system in Safe Mode.

Step 2: After your system is boot up, try and delete the file or folder which was causing the trouble to get deleted in normal mode.

Step 3: After deleting the file or folder, restart your system in normal mode and continue using it if you wish.

NOTE: The restarting system in safe mode and again coming back to normal mode might take several minutes so please wait patiently.

Hope this method helped you in deleting your file or folder without any difficulty.

 

That’s it guys. Hope you found this article interesting and informative.

Please let us know which method was helpful.

Thank you.

 

ADVERTISEMENT

2 thoughts on “Fix : Cannot Delete a File or Folder in Windows 11”

  1. It works if you stop and disable the service RealTimes Desktop Service. After you delete the folder you can enable the service again.

  2. Hi. Having tried several ‘solutions’, that didn’t work, I used your “How to Force Delete the file or folder permanently” – it worked! A very straight forward method.
    Many thanks.

Comments are closed.