Cannot remove a directory symbolic link on Windows
11,749
Did you try to select it in the explorer and just press Del?
Otherwise rmdir
should be able to delete it. See also this question: How can I delete a symbolic link?
Related videos on Youtube
Author by
Joseph
Updated on September 18, 2022Comments
-
Joseph almost 2 years
I created a directory symbolic link that points to an external drive:
mklink /D C:\local\work F:\work
I'm trying to remove it.
Opening cmd shell as administrator and running the command:rmdir C:\local\work
Get the error:
Access is denied.
Same thing by using:
cmd /c rmdir C:\local\work
from a Windows Powershell.
Same error even using the Sysinternals' Junction tool:junction -d C:\local\work
I also tried with:
fsutil reparsepoint delete C:\local\work
but I get the error:
The directory is not a subdirectory of the root directory. The FSUTIL utility requires a local NTFS volume.
Any suggestions?
-
Vadim K. about 5 yearsI'm having the same problem, can't remove dead symlink. Did you figure out?
-
David Spector almost 5 yearsI'm also having the same problem, deleting an empty directory from a Dropbox folder. There is no error message, but the directory survives delete in File Manager and rmdir in Powershell. Probably I have to logout and login again, I imagine, this being Microsoft and all.
-