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.


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 "


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