Issue: MKLINK /J creates invalid link [TCC 14.03.53]

May 31, 2008
382
2
Unlike MKLNK, MKLINK /J does not automatically replace the relative path of a junction target with an absolute path. This results in an invalid junction. Possible work-arounds: applying @FULL to MKLINK's target; using MKLNK instead of MKLINK /J.
JPSoft could classify this issue as either WAD or bug.
Code:
0>c:\temp

0>mkdir ddd

0>mklink /J ddd-mklink .\ddd
Junction created for ddd-mklink <<===>> .\ddd

0>dir /k /m ddd-mklink

TCC: (Sys) The system cannot find the file specified.
"C:\temp\ddd-mklink\*"

0>mklnk .\ddd ddd-mklnk
C:\temp\ddd-mklnk -> C:\temp\ddd

0>dir /k /m ddd-mklnk

1/03/2013 16:39 <DIR> .
1/03/2013 16:39 <DIR> ..

0>dir /k /m ddd*
1/03/2013 16:39 <DIR> ddd
1/03/2013 16:40 <JUNCTION> ddd-mklink [.\ddd]
1/03/2013 16:39 <JUNCTION> ddd-mklnk [C:\temp\ddd]

0>ver

TCC 14.03.53 Windows 7 [Version 6.1.7601]
 
May 20, 2008
3,515
4
Elkridge, MD, USA
The /A option does it for you! BTW, relative links are extremely useful (more than absolute ones required for junctions), because moving the whole tree (both the source and target of the link) to a different position in the file system, or copying it, a relative path retains the linkage, an absolute one does not.
 

rconn

Administrator
Staff member
May 14, 2008
12,367
150
Unlike MKLNK, MKLINK /J does not automatically replace the relative path of a junction target with an absolute path. This results in an invalid junction. Possible work-arounds: applying @FULL to MKLINK's target; using MKLNK instead of MKLINK /J.
JPSoft could classify this issue as either WAD or bug.

WAD, for compatibility with CMD. As Steve said, use /A if you want an absolute path.
 
May 31, 2008
382
2
This bites me often; I'm in the habit of checking for options with /? on the command line, instead of viewing the full help topic with F1. So I missed option /A of MKLINK because it isn't included in the /? help summary. I paid the price of my lazyness.
 
May 31, 2008
382
2
WAD, for compatibility with CMD. As Steve said, use /A if you want an absolute path.
Rex, apparently CMD's MKLINK /J creates absolute paths regardless of its target being specified as a relative path. Shouldn't TCC's MKLINK /J do the same instead of requiring /A ?
Code:
0>c:\temp

0>mkdir ddd

0>cmd /c mklink /J ddd-cmd .\ddd
Junction created for ddd-tcc <<===>> .\ddd

0>dir /k /m ddd-cmd

Directory of C:\temp\ddd-cmd\*

07/01/2013 11:12 <DIR> .
07/01/2013 11:12 <DIR> ..

0>mklink /J ddd-tcc .\ddd
Junction created for ddd-tcc <<===>> .\ddd

0>dir /k /m ddd-tcc

TCC: (Sys) The system cannot find the file specified.
"C:\temp\ddd-tcc\*"

0>dir /k /m ddd*

07/01/2013 11:12 <DIR> ddd
07/01/2013 11:13 <JUNCTION> ddd-cmd [C:\temp\ddd]
07/01/2013 11:14 <JUNCTION> ddd-tcc [.\ddd]

0>ver

TCC 14.03.53 Windows 7 [Version 6.1.7601]
 
Similar threads
Thread starter Title Forum Replies Date
cgunhouse TCToolBar /W Issue Support 2
G v28 Display Issue Support 7
Jay Sage Issue with CD_ENTER Alias Support 37
Jay Sage Issue with CD_LEAVE Alias Support 3
fpefpe How to? issue with % and evaluation Support 5
cgunhouse Standard User Account Issue Support 2
samintz WAD Display wrapping issue Support 5
M TCC color issue in ConEmu Support 4
samintz Timer issue Support 4
Alpengreis Documentation Minor issue in help file for view /E Support 1
samintz WAD ANSI issue Support 3
D TCSTART issue after reinstallation Support 14
A Documentation [Help file] OPTION "//" synopsis formatting issue Support 0
Chen Touboul Overtyping issue - i press the Insert key, help till press enter for new line in TCC Support 2
Y TCC and Cmder imcompatibility issue Support 7
M Another possibly strange remote registry issue Support 5
T WAD bpokestr issue Support 5
D High-DPI Scaling issue Support 1
S CMDebug 22 issue with del command Support 1
cgunhouse Foldermonitor Issue Support 7
samintz Build 38 Install issue Support 5
rps WAD Setlocal issue Support 4
Luiz Rodrigues Issue with Maven Support 1
Seven Update / install issue with 20.0.20.10.32 take command Support 7
Fross WebDav Drive Mapping Issue Support 19
D Upgrade issue Support 3
Fross V20b8 Everything Issue Support 5
T TCC display issue Support 1
cgunhouse _logfile Issue Support 5
T Fixed Querybox issue Support 1
cgunhouse Fixed Share Memory Issue Support 5
cgunhouse Foldermonitor with "/E" Option Issue Support 6
Fross TabComplete Argument Issue Support 1
fpefpe How to? Stange start up issue Support 1
C cosmetic issue with LIST's (I) Support 9
jbarnes1967 TC 18.00 x64 issue with lua io.popen() Support 2
D How to? Wildcards as sets - looping issue with FOR and REN Support 7
T WAD Free issue Support 6
R Fixed v17.0.54 Tab->COMSPEC Dialog Box Issue Support 2
R Minor Cosmetic Issue in Take Command Window Support 2
cgunhouse One line IFF ... Then ... Else ... EndIFF Statement issue in V17 Support 13
cgunhouse IFTP Path Issue in V17 - Fixed Support 7
S BDEBUGGER issue Support 9
cgunhouse @ISPROC Issue Support 15
cgunhouse TCMD.INI Issue Support 7
T Fixed multi-line alias issue Support 13
R WAD issue with filename completion with system and hidden files Support 8
D Strange issue with FOR loop Support 15
C Install Issue with 3rd Party Privelege Escalation Support 2
W Button command issue Support 5

Similar threads