Get & Set full path from a folder shortcut!

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
jamesfui
Posts: 50
Joined: 27 Mar 2010 23:00

Get & Set full path from a folder shortcut!

#1 Post by jamesfui » 17 Apr 2010 04:20

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)

Post Reply