Page 1 of 1

Deleting folders with "broken" junctions inside

Posted: 2022-11-30, 08:40 UTC
by yanch
It fails to delete/move folders with junctions, routing to nowhere. As for example:

1. There are Folder1, Folder2
2. I create junction link for Folder1 and place it into Folder2.
3. Then I delete or rename Folder1. Try to delete Folder2, containing "broken" link for Folder1. It fails with message
Image: https://i.imgur.com/8dV0zUW.jpg

There is no such a problem in explorer. I can delete folders like that successfully.
TC v.10.52x64 Windows 8.1x64. User Account Control (UAC) is disabled.
Junctions are created with help of NTLinksMaker or Link Shell Extension

Re: Deleting folders with "broken" junctions inside

Posted: 2022-12-01, 10:03 UTC
by ghisler(Author)
I cannot reproduce that. I used the Windows tool mklink to create the junction via a button:
1. Junction:
command: c:\windows\system32\cmd.exe
parameters: /C mklink /J %T%N %P%N
2. Symbolic link:
command: *c:\windows\system32\cmd.exe
parameters: /C mklink /D %T%N %P%N
Note the * in front of the command in the second case, it needs admin rights.

I can delete the folder with the junction just fine, even when the target no longer exists. Both deleting to recycle bin and directly work.