Can not delete files in File Explorer:
Table of Content:
About:
So you have a file in File Explorer that you can not delete, no matter what you try. What do you do?
Why it happens:
- The filename is too long.
- The filename includes invalid characters.
- The One Drive isn't sync'd.
- The file is corrupted.
You have tried:
- Deleting the file using the cmd command:
cd "C:\path\to\folder"
del "filename.pdf/txt"
-
Close all programs that might be using the file.
-
Check file permissions. Ensure your user account has Full control.
-
End tasks in Task Manager.
-
Check if the file name contains invalid characters. Rename it.
cd "C:\path\to\folder"
ren "\\?\C:\path\to\file.pdf" "newname.pdf"
How to fix:
Attempt 1 - Rename file:
Sometimes the file can be deleted again when the long filename is shortened. When you can not rename it the normal way, try this method:
-
Download WinRAR or 7-Zip and run it. Locate the file.
-
Right click the file and choose rename. This should work.
-
Now you can delete the file in the original folder. 😄