Windows – Cannot remove a directory symbolic link on Windows

symbolic-linkwindows

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?

Best Answer

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 Question