This page looks best with JavaScript enabled

Windows ERROR - Could not find this item

 ·  β˜• 1 min read

Preface

Recently, when my family was deleting one folder, an error occurs, and the error message is “Could not find this item”

ERROR message: Could not find this item

Windows ERROR happened while deleting file/folder

Could not find this item.
This is no longer located in. Verify the item’s location and try again.

Can not delete file

Can not delete folder

Root Cause

The root cause is that if you use typical Win32 syntax to open a file that has trailing spaces or trailing periods in its name, the trailing spaces or periods are stripped before the actual file is opened, so that’s why the error happened.

Refer Cause 6: The file name includes an invalid name in the Win32 name space

Reproduce issue and resolve

So, we need to use cmd and apply some commands to fix this issue

use \\?\ syntax to interact with this file/folder

The below screenshots demonstrates how to create and delete "C:\test " and "C:\test.txt "

Demo file

Demo folder
1
2
3
4
5
:: Delete file
del "\\?\C:\test.txt "

:: Delete folder
rmdir "\\?\C:\test "

Conclusion

This is my first time I have encountered this error, but it is quite easy to fix it.

Share on
Support the author with

JIHONGO
WRITTEN BY
JIHONGO
A Person