Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Facebook Twitter Instagram
Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Tech News Today
Home » Windows

Fix: Could Not Find This Item This is No Longer Located

Abhishek SilwalBy Abhishek SilwalJune 30, 2023
could not find this item this is no longer located

Windows uses the Win32 namespace to determine the validity of file and folder names. One of the rules, according to the namespace, is that the names cannot contain a trailing space or period (dot). So something like “file.txt.” or “file.txt ” (notice the space at the end) would not be valid.

However, there are situations where you can create or have such files or folders. Whenever you try deleting, renaming, moving, or copying such a file or folder, Windows will treat it as if its trailing space or period is not there. So it’ll search for some other item instead. 

In such cases, you’ll get an error message that says “Item Not Found. Could not find this item. This is no longer located in …” To resolve this issue, you need to use some means that do not depend on the Win32 namespace, which we have explained below.

Delete or Rename Through Command Prompt Using Long Device Path

The easiest way to solve this issue is by using the long device path of the file/folder according to the Universal Naming Convention while deleting the file. This path uses the \\?\ syntax before the absolute path.

Each file or folder contains a path that helps determine the exact location of the file/folder. For instance, The folder System32 inside the Windows directory of the C drive has an absolute path C:\Windows\System32. And its long device path is actually \\?\C:\Windows\System32

This type of path ignores any invalid characters in the path name, so you can safely use it to delete or rename the file showing the above error. You will have to use command-line interfaces like the Command Prompt and use the long device path with the respective commands for this purpose.

Note: If you want to move or copy the file/folder somewhere, it’s better to rename it first using this method. Then, you can move/copy it anywhere you want.
  1. Open Run by pressing Windows key + R.
  2. Type cmd and press Enter to open the Command Prompt. If the file or folder showing this error is inside your system directories (usually inside Program Files or Windows or other user files), you need to type cmd and press Ctrl + Shift + Enter to open the Elevated Command Prompt instead.
  3. Use the commands below depending on whether you wish to delete or rename the file.
    • To delete a file, type del "\\?\<Full path of the file>" and press Enter.
      For instance, if you wish to delete the file “random.txt ” (notice the trailing space) inside the D:\New folder, you need to use the command del “\\?\D:\New\random.txt ”
      del-long-device-path-command-prompt
    • To delete a folder, type rd "\\?\<Full path of the folder>" or rmdir "\\?\<Full path of the folder>" and press Enter.
      So, if the folder is “D:\New\Error ” (with the trailing space), you need to use the command rd “\\?\D:\New\Error ”
      rd-rmdir-long-file-path-trailing-space
    • To rename the file, type ren “\\?\<Full path to the file>” “<New file name> and press Enter.
      For instance, if the file is “D:\New\random.txt ”, use the command ren “\\?\D:\New\random.txt ” “random.txt”
      rename-file-long-device-path-command-prompt-trailing-space
    • You can’t rename a folder this way. So you’ll need to move its contents to a new folder and then delete the folder. The commands for “D:\New\Error ” are as follows
      md “D:\New\Error” (without trailing space)
      move “\\?\D:\New\Error \*” “D:\New\Error”
      rd “\\?\D:\New\Error ”
      create-new-folder-move-from-folder-with-trailing-space-delete-old-folder-long-device-path-command-prompt
      If you get the error “The filename, directory name, or volume label syntax is incorrect.” while using the move command, it means that the folder is empty, and you can safely remove it.

Mirror an Empty Folder Using Robocopy

It is also possible to resolve this issue by forcefully deleting the error file or folder in the following way:

  • Make it the sole file or folder inside its parent folder.
  • Mirror an empty folder to this folder.

You can use the robocopy command with the /mir option to mirror the empty folder. 

However, remember that you can only delete the folder or file using this method. If you need to rename it (or move/copy), it’s best to use the above method instead.

  1. First, move all the other contents of the directory containing the folder or file with the error somewhere else. For instance, if the error occurs in “random.txt ” inside D:\New, move all other files and folders except “random.txt ” somewhere else. This way, “random.txt ” is the only item inside D:\New.
  2. Then, create an empty folder in any location. I’ve created the folder Empty Folder inside D: for this example.
  3. Open the Command Prompt (cmd in Run).
  4. 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
    robocopy-mirror-empty-folder-to-parent-folder-of-files-and-folder-with-trailing-zero-name
  5. Move back the previous contents of the parent directory.
fix
Abhishek Silwal
  • LinkedIn

Abhishek Silwal is an Electronics Engineer and a technical writer at TechNewsToday. He specializes in troubleshooting a wide range of computer-related issues. His educational background in Electronics Engineering has given him a solid foundation in understanding of computers. He is also proficient in several programming languages and has worked on various robotics projects. Even in his early days, he used to tinker with various computer components, both hardware, and software, to satiate his curiosity. This experience has given him a breadth of experience that goes beyond his educational qualification. Abhishek has been writing articles on dealing with varieties of technical issues and performing specific tasks, especially on a Windows machine. He strives to create comprehensive guides on fixing many system and hardware issues and help others solve their problems. You can contact him at abhisheksilwal@technewtoday.com

Related Posts

how to turn off hardware acceleration

How to Turn Off Hardware Acceleration

September 22, 2023
what happens if you turn off your computer during an update

What Happens if You Turn Off Your Computer During an Update?

September 18, 2023
How to Disable Integrated Graphics

How to Disable Integrated Graphics?

September 16, 2023
System Restore Stuck

How To Fix Windows Stuck on System Restore

September 16, 2023
startup-repair-couldn't-repair-your-pc

How To Fix “Startup Repair Couldn’t Repair Your PC”

September 13, 2023
how to free up ram

How to Free Up Memory

August 4, 2023
Add A Comment

Leave A Reply Cancel Reply

Latest Posts
how to turn off hardware acceleration

How to Turn Off Hardware Acceleration

September 22, 2023
motherboard chipset

Understanding Motherboard Chipset and Its Importance

September 20, 2023
Naval-Warfare-Games

Best Naval Warfare Games

September 18, 2023
You may also like
printer-not-printing

How to Fix a Printer That’s Not Printing

September 20, 2023
Share Location With Friends and Family

Share Location With Friends and Family (iPhone and Android)

September 18, 2023
how-to-print-without-a-printer

How to Print Without a Printer

September 18, 2023
Recommended
Cookie Clicker Garden Guide

Cookie Clicker Garden Guide to Unlocking Every Seed

September 26, 2021
monitor no signal

Computer Turns On But Monitor Says No Signal (9 Ways To Fix)

November 10, 2022
Facebook Twitter Pinterest
  • Home
  • About Us
  • Our Team
  • Editorial Guidelines
  • Privacy Policy
  • Affiliate Disclosure
© 2023 TechNewsToday, editor@technewstoday.com | Tech Central Pvt. Ltd.

Type above and press Enter to search. Press Esc to cancel.