Windows uses the Win32 namespace to determine the validity of file and folder names. One of the rules, according to namespaces, is that names cannot contain spaces or periods (periods). So something like “file.txt.” or “file.txt” (note the trailing space) will not be valid.
However, there are situations where you may create or own such files or folders. Whenever you try to delete, rename, move, or copy such files or folders, Windows will treat them as if the space or backpoint doesn’t exist. So it will look for some other item instead.
In such a case, you will get an error message that reads “Item Not Found. Cannot find this item. It is no longer located in…” To solve this problem, you need to use some way that is independent of the Win32 namespaces, which we have explained below.
Delete or Rename Via Command Prompt Using Path Length Tool
The easiest way to solve this problem is to use the long device path of the file/folder according to the Universal Naming Convention when deleting files. This path uses the \\?\ syntax before the absolute path.
Every file or folder contains a path which helps determine the exact location of the file/folder. For example, Folders System32 in the windows directory C drive has absolute path C:\Windows\System32. And the long device path is actually \\?\C:\Windows\System32
This type path ignores invalid characters in pathnames, so you can safely use it to delete or rename files showing the above error. You have to use a command line interface like Command Prompt and use long device paths with each command for this purpose.
Notes: If you want move or copy files/folders somewhere, you should first rename it using this method. Then, you can move/copy it wherever you want.
Open Run by pressing Windows key + R. Type cmd and press Enter to open Command Prompt. If the file or folder showing this error is inside your system directory (usually within Program Files or Windows or other user files), you need to type cmd and press Ctrl + Shift + Enter to open Elevated Command Prompt As a replacement. Use the commands below depending on whether you want to delete or rename files. For delete filestype del”\\?\
For example, if you want to delete files “random. txt” (note the trailing space) inside D:\New folderyou need to use the command del “\\?\D:\New\random.txt” to
So if the folder is “D:\New\Errors” (with trailing spaces), you need to use the command rd “\\?\D:\New\Error” To
For example, if the file is “D:\New \random.txt”, use your “\\?\D:\New\random.txt” “random.txt” ren command unable to rename folder with this way. So you should moves its contents to a new folder, then deletes the folder. Order for “D:\New\Errors” are as follows
md “D:\New\Error”(no trailing spaces)
move “\\?\D:\New\Error\*”“D:\New\Error”
rd “\\?\D:\New\Error”
If you get an “Incorrect file name, directory name, or volume label syntax” error when using the move command, it means the folder is empty, and you can safely delete it.
Mirror an Empty Folder Using Robocopy
It is also possible to solve this problem by forcibly deleting the error file or folder in the following way:
Make it the only file or folder inside the parent folder. Mirror empty folders to this folder.
You can use the robocopy command with the /mir option to mirror empty folders.
However, remember that you can only delete folders or files using this method. If you need to rename it (or move/copy), we recommend using the method above.
First, move all other contents of the directory containing the folder or file with the error elsewhere. For example, if an error occurs in “random.txt” inside D:\New, move all other files and folders except “random.txt” to another place. This way, “random.txt” is the only item inside D:\New. Then, create an empty folder in any location. I’ve created an Empty Folder folder inside D: for this example. Open Command Prompt (cmd in Run). Type robocopy “Empty folder path”“Path of parent folder of error file/folder”/mir and press Enter. In this example, the command would be robocopy “D:\Empty Folder”“D:\New”/mir Returns the previous contents of the parent directory.
Closing
Thus the article about Fix: Can’t Find This Item It’s No Longer Located
I hope the information in the article is useful to you. Thank you for taking the time to visit this blog. If there are suggestions and criticisms, please contact us : admin@bocahhandal.com