Opening symlinks from command-line

2. Help
Achton
2005-09-20
2012-11-13
  • Achton
    Achton
    2005-09-20

    When I try to open a symlinked file in Windows XP from command line (or actually, from a CMD script), I get the error

    Could not open file "".

    It's a link to an ascii text file. If I append the .lnk to the end of the file (like notepad++ E:\file\symlinked.txt.lnk) I just get the actual binary code in the .lnk file. How do I circumvent this?

    Thanks,
    G.

     
    • Don HO
      Don HO
      2005-09-27

      Unfortunately, you can't.
      The symlinked file (I think you mean symbolic link in unix. it names "shortcut" under Windows) is managed by Windows' shell, but not by application.

      Don

       
      • Achton
        Achton
        2005-09-27

        Too bad. I thought there might be a way to hook into Windows' API and access the shortcut that way.