Page 1 of 1

Get & Set full path from a folder shortcut!

Posted: 17 Apr 2010 04:20
by jamesfui
hi dostips batch scripters,
is there a way to get the original full path from a 'folder shortcut' & set it in the variable of a bat? :?

for example,
c:\desktop\folder.lnk
the true full path of the folder.lnk is at c:\backup\folder

so what is the script to read the true full path from the folder.lnk shortcut and set it in the define variable inside a bat??

like below,

set var="the full path from the folder.lnk"


actually the bat will read as
set var="c:\backup\folder"

so that everytime i just create a folder shortcut, i double click on the bat it will automatically set the var as from this folder.lnk shortcut without copy & paste the full path manually!!

thanks in advance.. 8)