When you attempt to delete a file or folder on your Windows computer, the “Item not found” error may appear. Here is the full error message:
Could not find this item. This is no longer located in [folder path]. Verify the item's location and try again.
This article explains how to fix the error when deleting a file or folder in Windows.
Methods
Fix “Could Not Find This Item” When Deleting
First, make sure you refresh the screen by pressing the F5 key. This is to check if the file or folder really exists, or if it has been already deleted by some program and only the ghost icon appears. If the file or folder appears even after refreshing the screen, then try one of these methods to delete the file or folder.
Method 1: Delete the file or folder from Command Prompt
- Press and hold the Shift key and right click on the file or folder
- Select
Copy as Path
in the context menu. - Open a Command Prompt window (
cmd.exe
) - Type the following command to delete the item:
If it’s a file:del [drive:\path\filename]
If it’s a folder:
rd /s /q [folderpath]
(In the above example, the
Office Docs
folder along with all the sub-folders and files will be deleted.)It’s always better to include the complete path to the file or folder when deleting. Note that you can paste the file/folder path from the clipboard (which you copied in
Step 2
above) to the Command Prompt by pressing Ctrl + V.
Method 2: Delete the file or folder from Command Prompt Using Short File Name format
Use the 8.3 (short file name) file/folder name to delete the item from Command Prompt. Follow these steps:
- In the Command Prompt window, change to the parent directory of the file or folder.
- Type
DIR /X
to find the short file/folder name (8.1
name). For example, the short file name for a file namedtogglethumbs.vbs
may be something liketoggle~1.vbs
. - Then delete the file or folder using its short file name from the Command Prompt.
Method 3: Rename the file or folder
Once you find the short file/folder name, you may try renaming it. To rename a file or folder, use this command-line syntax:
- Open a Command Prompt window.
- Then, use the following command-line syntax to rename the item:
REN drive:\path\OldName Newname
For example:
REN drive:\path\toggle~1.vbs toggle.vbs
- Exit the Command Prompt.
- See if you can delete the file via File Explorer.
Method 4: Dealing with File/Folder Names ending with DOT or Space
When the file or folder name contains reserved characters or the names end with a dot (.), or space, deleting the file or folder may cause the above-said error.
If you find (using DIR /X
command) that the file or folder name has a trailing space or a dot (.
) at the end, use the following syntax (“\\?\
“) to delete the item:
In the Command Prompt window, type:
To delete a folder:
rd /s "\\?\D:\bad\folder\path "
(Note the trailing space)
rd /s "\\?\D:\bad\folder\path."
(Note the trailing dot)
Examples:
rd /s "\\?\D:\Shared\folder1 "
rd /s "\\?\D:\Shared\folder1."
To delete a file:
del "\\?\c:\path_to_file_that contains a trailing space.txt "
(Note the trailing space)
del "\\?\c:\path_to_file_that contains a trailing dot."
(Note the trailing dot)
(Example) Deleting folders with reserved names or having invalid characters in the name.
In this example, there are three invalid folders namely Con
, Conduct.
and LocalState..
(Note that the word con
is a reserved name, and shouldn’t be used in file or folder names.)
Attempting to normally access the folder with a reserved name (e.g., con
) causes the following error:
Location is not available
path:\con is not accessible.
The handle is invalid.
To delete the folder, we’ll now run the following command from administrator Command Prompt:
rd /s "\\?\C:\con"
The other two folders namely conduct.
and LocalState..
have invalid characters (.) in the file name. Let’s run the following commands to delete those folders:
rd /s "\\?\C:\conduct." rd /s "\\?\C:\LocalState.."
Voila! The three folders are now removed.
For more information on dealing with files containing reserved or invalid characters, see Microsoft article You cannot delete a file or a folder on an NTFS file system volume.
Advanced Methods
If none of the above options help, check out the article How to Delete a Stubborn Undeletable File or Folder in Windows? to learn about other methods to delete the stubborn, corrupted, or undeletable file or folder. Here are some of the options discussed in that article:
- MoveFile.exe method
- Process Explorer method
- Using “Unlocker”
- Disk error checking
- Dealing with incorrect NTFS Permissions
- Dealing with invalid or reserved characters in file/folder name
Hope one of the methods discussed in the article helped you successfully delete a file or folder without getting the “Could not find this item” error message.
One small request: If you liked this post, please share this?
One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!
The best guide, really fixed my problem!! no one else had these answers so readily available and well explained, thanks very much!!!
You are a genius.
Method 4 worked like a charm.
Thanks
Thank you!!! Stupid “.”
Perfect!
Many thanks! This guide did the trick in helping me delete a pesky file with no extension and a trailing space! Much appreciated ❤
My folder had a space at the end of its name, I finally was able to delete it, thank you.
THANKS! Method 4 worked for me, after method 1, 2 and 3 failed. (the folder was originally called “C:\delete this” delete as part of the name is a reserved name?
In file explorer (win 10 pro), I tested just now – right clicked, new, folder and called it delete this
Then tried to delete it. It deleted fine (yeah, there were no files / folders in it).
And what’s that syntax \\? !?!?!? Never saw that before : )
Thanks!
Whew – the rd /s “\\?\D:\bad\folder\path ” method worked for me. There was a buried subfolder with several . (dots) in the name. You are the best!
Amazing, #1 and #4 finally helped me delete my folders. Thank you!
it work but forget include the file name….it remove whole directory…..any idea to undo or restore back the file?..
@KH: You may need a third-party file recovery tool to do that.
Somehow got robocopy to create a folder with a space at the end on Windows 7. This worked great! Still not sure why Windows Explorer isn’t smart enough to delete these files/folders from the GUI if they know enough to populate them in the tree.
Thanks a lot! The only real advice that solved my annoying problem that I had with some folders for a long time.
Joining the chorus of adoring fans for whom Method #4 solved their ridiculous issue.
Thank you!!
Thanks ! The first few lines fixed it!
Method 4 worked for me as well. Thank you.
Method 4 thanks the worked!
Amazing method 4 worked like a charm for a pesky file i copied. File Assassin was unsuccessful
great, worked
You made it look too easy. Thanks!!
Method 1 worked a treat. THANK YOU!
Thank you! The last one worked for me! Must have been one of those pesky characters.
rd /s “\\?\C:\Users\Windows 10\Desktop\Folder1”
😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀❗
Brilliant.
Thanks so much for finally helping me to solve a annoying problem.
Thank You Very Much For The Help Mr. Ramesh Srinivasan.
This worked for me,
To delete a file: del “\\?\c:\path_to_file_that contains a trailing dot.”
Thank you very much for this tutoria. I had two files whose names ended with a trailing dot, and the following command worked for me:
del “\\?\c:\path_to_file_that contains a trailing dot.”
Method 4 worked!!! thanks a lot. i had 3 files with the trailing dot and been searching the net for over a year .. finally this worked. thanks a lot again
Excellent – Method 4 worked for me, I didnt realize there was a spac at the end, I could not even rename it. Thanks for this blog.
Great article. Thanks
del “\\?\D:\filename ”
work for me. You should’ve preemptively tell if that is the case with erroneous filename.
great guide – cmd line worked for me
Thank you, thank you, thank you. I was going out of my mind.
thank you
Whew, the command, rd /s “\\?\C:\con”, worked for me. Thank you very much!
This helped me get rid of a weird Radeon ReLive folder ending in space, Fix 4. Thanks so much!
Today I learn something new:
1. Copy as Path
2. “\\?\“ syntax
Tq author.
Lifesaver
This was driving me absolutely crazy! Fixed it right away with that first step, via the command prompt. Thank you so much!
thanks a mill!
Thanks!
Wow, man! Just wow!
del “\\?\c:\path_to_file_that contains a trailing dot.”
did it for me finally after tolerating it for years. It was UC Browser garbage.
Excellent. Thanks for the comment 🙂
Thank you! Hours I spent over the past few months trying things, method 4 was the solution
Man! Very thanks for sharing! Greetings!!! I never see this parameter before in command prompt: “\\?\” Saved my time! Only on Shadow Copies in Disk Properties… Great!
THANK YOU SO MUCH! I spent hours trying to find a way to delete a folder with a space at the end of its name, you saved me!
Thank you again!