script.bat: how to get the path of its shortcut script.lnk ?
Posted: 08 Oct 2008 08:16
Hello,
Let's a .BAT file "test.bat" like:
and its MS Windows shortcut "test.lnk" (located in another folder).
How to get the path (and file name) of this shortcut "test.lnk"
a) when double clicking on the .LNK
b) when dropping a file on this .LNK
Thanks
Let's a .BAT file "test.bat" like:
Code: Select all
ECHO.Path of this script %~nx0: %~DP0
ECHO.Path of its Windows shortcut(.LNK): __ ?
Pause&EXIT
and its MS Windows shortcut "test.lnk" (located in another folder).
How to get the path (and file name) of this shortcut "test.lnk"
a) when double clicking on the .LNK
b) when dropping a file on this .LNK
Thanks