How to really force delete a file / folder in Windows 10
The solution
I finally managed to delete the file and folders by rebooting into cmd prompt troubleshooting mode (at lock screen, hold shift, click power icon and reboot, then choose reboot to command prompt).
From there I could navigate to the file, and delete it with del /f filename
, and the folders with rmdir /s directory
Maybe this will help someone else - this was one of the last steps I tried and given how painless it was, it may be worth trying this before the alternatives.
Related videos on Youtube
XDGFX
Updated on September 18, 2022Comments
-
XDGFX over 1 year
This 'question' is more of a possible solution to others who were in the same scenario that I was stuck in for a few days.
I had a file that had been created after a failed software install, inside two folders which were owned by a special 'shared' user who cannot login - it's just a way to access network shares without my main account details.
I tried all the usual solutions, take ownership, third party programs, delete from command line - nothing was working... the file apparently didn't exist whenever I tried to delete it, and deleting folders gave permissions errors regardless of owner.
-
person27 over 4 yearsAppreciated! Good for files that are always, always locked when the computer is in use. A dll from Telerik's JustDecompile does that apparently, and viruses probably do.