Problem
Two folders on a file server I administer had been created with a space at the end of the folder name. This is not allowed in Windows, but can something happen.
If I tried to delete these folders but I got the message “Could not find the item”
If I tried to view the security of the folder I got the message “The requested security information is either unavailable or can’t be displayed”
Solution
I found it was possible to delete the folders via a CMD prompt using the command;
rd “\\?\C:\path to bad sub dir\bad dir “
External Links
http://stackoverflow.com/questions/21072767/windows-7-cant-delete-a-folder-with-a-trailing-space
Hero status awarded! Thanks for this!
Thank you very much for this, i was struggling to delete a directory for 2 hours and this was the final command which actually worked. 🙂
elevated CMD vs Elevated Powershell
had this issue on a 2012R2 File server – didn’t try non-elevated of either.
appreciate the command and it resolved the issue for me – thought I was crazy!
all old commands 8.3 version and others not working – (8.3 disabled on this server)
Thank you !
TY
Thank you!
The “rd” command perfectly worked for me. Thank you so much for the author and this forum for resolving my issue.
Super Hero, Good man….
can u tell me how to copy the files inside that folder,pls…
i need the files inside it.
Thank you for this!
Thanks !!!
Wow! It worked for me.
Thanks! This works for all the issues related to undeleteable folders (any wonky folder names)
All the posts on windows help websites were troll. honestly I wish I can upvote you to the top of google search
I’m really glad it helped!
Thanks
Phil
After trying numerous ‘solutions’ this was the only one that worked!
Thanks!