Skip to main content
The 2024 Developer Survey results are live! See the results
5 of 5
docs.microsoft.com has been retired and replaced with learn.microsoft.com. See https://meta.superuser.com/questions/15220/ for more information

Be very careful.

If you have a symbolic link that is a directory (made with mklink /d) then using del will delete all of the files in the target directory (the directory that the link points to), rather than just the link.

SOLUTION: rmdir on the other hand will only delete the directory link, not what the link points to.

eddyq
  • 7.3k
  • 1
  • 16
  • 2