Problem with copying junctions

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Keeper Riff
Junior Member
Junior Member
Posts: 2
Joined: 2014-05-18, 08:44 UTC

Problem with copying junctions

Post by *Keeper Riff »

I have these settings in wincmd.ini:

Code: Select all

[Configuration]
CopyLinks=2
IgnoreLinks=0
SyncIgnoreJunctions=0
I try to copy this folder structure

Code: Select all

d:\folder1
d:\folder1\link_to_folder2
d:\folder2
d:\folder2\testfile1
The link was created via MKLINK /J

When I copy this structure to c:\test , I expect c:\test\folder1\link_to_folder2 to be a link to c:\test\folder2
But the result is a broken link. The result of DIR command shows the following:

Code: Select all

18.05.2014  13:09    <JUNCTION>     link_to_folder2 [\??\c:\folder2]
When I copy the structure to d:\test , the copied link d:\test\folder1\link_to_folder2 still points to d:\folder2 but looks somewhat broken in DIR listing:

Code: Select all

18.05.2014  13:14    <JUNCTION>     link_to_folder2 [\??\d:\folder2]
What am I doing wrong?

-EDIT-
Tried to copy from d:\ to c:\ without subfolder in the target path. Now the new link works on c:\folder2 but still looks weird when listed in DIR command:

Code: Select all

18.05.2014  13:26    <JUNCTION>     link_to_folder2 [\??\c:\folder2]
Compared to the original:

Code: Select all

18.05.2014  12:56    <JUNCTION>     link_to_folder2 [d:\folder2]
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Keeper Riff,
Actually \??\ prefix is not a bad sign for junctions, it is OK (it is an internal prefix for junctions). I've tested it just now, TC have copied link correctly.

Source dir (first junction was made using mklink and second one was made using my NTLinks Maker tool):

Code: Select all

18.05.2014  15:54    <JUNCTION>     556 [F:\TEMP\0\67]
18.05.2014  15:53    <DIR>          67
18.05.2014  15:52    <JUNCTION>     hg [\??\F:\TEMP\0\67]
Target dir (test1):

Code: Select all

18.05.2014  15:55    <JUNCTION>     556 [\??\F:\TEMP\1\67]
18.05.2014  15:55    <DIR>          67
18.05.2014  15:55    <JUNCTION>     hg [\??\F:\TEMP\1\67]
Target dir (test2):

Code: Select all

18.05.2014  15:56    <JUNCTION>     556 [\??\D:\TEMP\test\67]
18.05.2014  15:56    <DIR>          67
18.05.2014  15:56    <JUNCTION>     hg [\??\D:\TEMP\test\67]
Both links are correct after copying, I can enter them.

BTW you can use e.g. my NTLinks plugin in order to see junctions' target paths in TC columns or tooltips.
Keeper Riff
Junior Member
Junior Member
Posts: 2
Joined: 2014-05-18, 08:44 UTC

Post by *Keeper Riff »

MVV wrote:Keeper Riff,
Actually \??\ prefix is not a bad sign for junctions, it is OK (it is an internal prefix for junctions). I've tested it just now, TC have copied link correctly.
Well, at least I can copy them to another drive safely. Tried a fresh install with default wincmd.ini, tried 64 and 32 bit version and elevated rights — still doesn't work when the target path is different.

Another problem is Synchronize Dirs function. It does not copy links but creates a copy of the folder. Is it by design or is something wrong again?
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I tried to copy both from root-level dir to inner on another drive and back, and links work fine. Also tried TCx64 with clean INI, just with your three options from first post.

Sync tool doesn't copy junctions, you only can skip their contents using SyncIgnoreJunctions option.
Post Reply