MKLNK exit status

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
May 31, 2008
376
2
#1
MKLNK seems to set %_? to zero even in the face of errors. I could test this issue on an XP machine as I don't have a newer OS with me at the moment. Rex, if you do think this is an actual bug would you please roll a fix for TCCLE, too? I can reproduce on TCMD 16.00.43 and TCCLE 13.06.77.
Code:
TCC 16.00.43 Windows XP [Version 5.1.2600]
Copyright 2014 JP Software Inc. All Rights Reserved

Active code page: 1252
C:\>mkdir c:\temp\target & dir /k/m c:\temp\target
23/03/2014 9:18 <DIR> .
23/03/2014 9:18 <DIR> ..

C:\>mklnk c:\temp\target c:\temp\link & echo %_? %?
C:\temp\link -> C:\temp\target
0 0

C:\>mklnk c:\temp\target-NOT-THERE c:\temp\link & echo %_? %?
TCC: (Sys) The system cannot find the file specified.
"C:\temp\target-NOT-THERE"
0 0

C:\>
 
#5
If you mean XP, I still prefer it, both for lack of finances to purchase a new laptop that does not provide additional benefit for my use, and because they're lack of backward compatibility - even if I could afford it, I would not want to learn the new user interfaces to almost every program with few, if any, benefits for my use. Were I 50 years younger I may hanker for some features, but definitely loved IBM's decision to make backward compatibility their most important design rule. BTW, I do own a Win7 system, but I like it much less (and it's not even luggable).

And aren't junctions and symbolic links identical concepts, but the latter not restricted to a single volume as the former is?
 
#6
When experimenting, I noticed that MKLINK will make a symbolic link even if the target (directory or file)does not exist. I suppose that's because CreateSymbolicLink() will do so. But it might be a nice touch to prevent the user from doing something useless (unless it's common practice to create symbolic links and create the target later).
 

rconn

Administrator
Staff member
May 14, 2008
10,162
86
#8
When experimenting, I noticed that MKLINK will make a symbolic link even if the target (directory or file)does not exist. I suppose that's because CreateSymbolicLink() will do so. But it might be a nice touch to prevent the user from doing something useless (unless it's common practice to create symbolic links and create the target later).
WAD -- that's how MKLINK behaves in CMD.