I am in the process of trying to delete a folder from C:\Users but when I try and delete it, it tells me the folder cannot be deleted because there is a file name that is too long to go in the recycle bin. The catch is, it doesnt appear like there is anything in the folder. So since I have no idea where the file in question is, I cannot try and shorten the name. The box that pops up says destination path too long and shows a long file name with a bunch of weird symbols mixed in. I have tried opening a command window in this directory and used the DIR /X command but it does not show anything. I am running Windows 10. This has become extremely frustrating! Someone please help!
Asked
Active
Viewed 451 times
2 Answers
0
One trick is to use robocopy
Create an empty directory like c:\empty, then use robocopy /mir /purge c:\empty c:\users\folder_to_be_removed. Robocopy can handle the really long file paths, and the /mir + /purge options will remove all the extra files from the 'destination' folder.
Zoredache
- 20,438
0
Another method in cmd is to mount a drive to a path using subst.
subst B: C:\deep\folder
B:
del B:\deep
From a related question : How do you mount a directory as a drive in Windows 7?
MountainMan
- 6,070