Hackviking He killed Chuck Norris, he ruled dancing so he took up a new hobby…


Unable to delete file: System cannot find the file specified

Running hybrid systems spanning from windows to different flavors of Linux sometimes present you with interesting behavior. One that I have faced every now and then is files that you can't delete due to special characters in the filename. They do show up in the file explorer but when you try to delete them you get "Item not find" or similar error. Seen a lot of different solutions online with third party software and other complex solutions but there is two simple "built-in" ways to deal with this in windows.

dir /x method

Open up a cmd window and navigate to the folder in question. Run a simple dir /x command and it will list the files with the non-8dot3 short names. Then you can just go del {non-8.3-filename} and you will get rid of the file.

rd /s "\\?\c:\temp" method

Not all files generate the non-8dot3 name for some reason, don't ask me why - didn't dig that deep. For this there is a solution as well. In this scenario make sure that the files you want to get rid of are the only one/ones in the directory and run rd /s "\\?\C:\folder\containing\problem\file". This command will remove all the files and the directory as well.

Comments (9) Trackbacks (0)
  1. Long path error is a very common problem in Windows users face. Try using Long Path Tool if your computer is giving errors like, “Path too long”, “Path too long – aborting (error code 80/1)”, 0x80010135 Path too long”, “Error cannot delete file: cannot read from source file or disk” or “File cannot be copied”. You can use Long Path Tool to resolve these problems. Get support of this product by subscribing it online.

  2. You can fix this by using Long Path Tool. The software that will let you easily delete, copy or rename long path files.

  3. Tjis issue wasn’t due to long file names. It occluded due to special characters in file names.

  4. use long path tool to solve problems about long path its really works.

  5. In this instance it was special characters in the file name causing the error. Also like the solutions since they are built into windows, no 3rd party applications needed.

  6. “Long path tool” is very helpful for this problem. You can solve this problem like copy, delete, long path files by using this tool.

  7. filename too long cannot rename now setup new rename

  8. Try Long Path tool software.

  9. I suggest you Long Path Tool will let you easily delete, copy or rename long path files, you can try it for better service.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

No trackbacks yet.