Delete an undeletable file
Have you been presented with a “cannot be deleted” popup when trying to delete a file? If you have checked whether the file is in use and found it is not, then let us move on.
Press ‘win logo key+r‘. This brings up the run window. Type in cmd and press enter. In the command prompt window that shows up, navigate to the required folder (where the file is) using the command: “cd c:*****” (without double quotes). Stars stand for the address of your folder.
For example if the file you need to delete is fun.txt which is located in a folder mine in the C drive, then the address of the file is c:mine. So type the command: cd c:mine and press enter.
hint: If the folder name has spaces type in first 6 characters then put a ~ and then 1 without spaces. For example, if the folder name is ‘Norton Antivirus’ located inside ‘Program files’ under C drive type “c: Progra~1Norton ~1 ” (without double quotes).
Before continuing to the next step, close all the programs (save cmd prompt) and open task manager using the shortcut Ctrl+Shift+Esc. Under the process tab, end the process ‘explorer.exe’. Now in the command prompt, type “dir” to list all the files in the folder. Now type “DEL <filename>”, where “<filename>” is the file you wish to delete. For example, if the file name is bad file.jpeg type “DEL badfil~1.jpeg” (without double quotes). Now your file should be gone.
Now open task manager. Click new task under file tab, type explorer.exe and press enter to restart GUI shell.
or you can try this too
Open run type notepad and press enter. Click File>Save As>. Locate the folder where your undeletable file is. Choose ‘All files‘ from the file type box. Click once on the file you want to delete so its name appears in the ‘filename‘ box. Put a “ at the start and end of the filename(The filename should have the extension of the undeletable file so it will overwrite it). Click save, it should ask you to overwrite the existing file, choose yes. Now you will be able delete it the normal way.


