This is a follow up question to a "LiveLink" query
http://www.mjtnet.com/forum/viewtopic.php?t=6986
I have a shortcut icon of type .LNK on my desktop to a Livelink folder
Right click properties on said shortcut I obtain something to the effect for "Target"
Target : "L:\LiveLink system \Drop report here"
I'm able to create a script to copy file to "Target"
CopyFile>%Here_is_one_of_the_reports%,L:\LiveLink system \Drop report here\Here_is_one_of_the_reports.pdf
.. which is cool.
However each report has its own folder on LiveLink.. Different TARGETs.
Now here is my question:
Is there a way to obtain "Target" from a shortcut-?
If so.. then I could get the ""L:\LiveLink system \Drop report here" as a LiveLink variable
CopyFile>%File_name%,%A_livelink_variable%\Here_is_the_report.pdf
Thanx
... Michel
method to obtain TARGET of a shortcut
Moderators: JRL, Dorian (MJT support)
Try this and let us know.
List of properties that can be retrieved. (There may be others.) Just substitute one of these for the word "TargetPath" in the script.
Arguments
Description
FullName
IconLocation
Hotkey
TargetPath
WindowStyle
WorkingDirectory
Code: Select all
Let>File=Path and name.lnk
VBSTART
Function GetProp(Prop)
dim wshShell, propOb
Set wshShell = CreateObject("WScript.Shell")
Set propOb = wshShell.CreateShortcut(Prop)
GetProp = propOb.TargetPath
End Function
VBEND
VBEval>GetProp("%File%"),res
MessageModal>res
List of properties that can be retrieved. (There may be others.) Just substitute one of these for the word "TargetPath" in the script.
Arguments
Description
FullName
IconLocation
Hotkey
TargetPath
WindowStyle
WorkingDirectory