“Item Not Found” when attempting to delete a file or folder in Windows

I ran across this issue today with a customer and it took quite a bit of digging to find a solution.  Here is a screenshot of the error:

item not found error

In digging around I found there is a utility to address this issue, but I am cheap and don’t want to pay for something if I can find an alternate solution.  Without further ado, here is how you fix it.

To delete a file:

  1. Open an administrative command prompt.
  2. Run the following command: del “\\?\X:My Directory\Bad File.ext”  (Replace everything after \\?\ with the actual path to the problem file.)

To delete a folder/directory:

  1. Open an administrative command prompt.
  2. Run the following command: rd /s “\\?\X:My Directory\Bad Directory”  (Replace everything after \\?\ with the actual path to the problem directory.)

 

Where is that easy button?

 

 


 

Thanks to  Rayza73 who posted this on the Microsoft forums.