1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MKLNK exit status

Discussion in 'Support' started by Stefano Piccardi, Mar 23, 2014.

  1. Stefano Piccardi

    Joined:
    May 31, 2008
    Messages:
    376
    Likes Received:
    2
    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:\>
    
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,869
    Likes Received:
    83
    MKLNK has been obsolete for at least the past 5 or 6 versions; you should be using MKLINK.
     
  3. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    Rex, why has not been the above statement ever in HELP? Expect us to DWYM (not a misspelling!)?
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,869
    Likes Received:
    83
    It was discussed (far) past the point of exhaustion in the forums. IIRC, at that time you were not using a modern OS that supported links.
     
  5. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    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. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,970
    Likes Received:
    30
    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).
     
  7. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    It is common in the un-windows world. Think about frequently mounted and dismounted drives.
     
  8. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,869
    Likes Received:
    83
    WAD -- that's how MKLINK behaves in CMD.
     
  9. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,869
    Likes Received:
    83
    Well -- no. They are somewhat similar (for directories only).
     
  10. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    For my education only, what is the difference between a symbolic link whose target is an intravolume directory, and a junction?
     

Share This Page