AskFileName and shortcut files
Keywords: AskFileName .LNK shortcut files
Question:
When I use the AskFileName function and select ".lnk" (ShortCut) files, it automatically returns the target of the ".lnk" instead of xxx.lnk file name. Is there anyway to get the ".lnk" filename instead?Example:
FileList = AskFileName("Select Files to Copy", "C:\", "ALL Files|*.*", "*.lnk", 2)Returns:C:\WINNT\Notepad.exe instead of notepad.lnk.Answer:
Sorry, no. Not with AskFileName. A number of functions "tunnel" through the link file to get to the actual target file name.Are you just interested in lnk files? If the ones you are interested in are all in the same directory you can...
DirChange("c:\someplace") lnklist=FileItemize("*.lnk") mylnk=AskItemList("Choose",lnklist,@tab,@sorted,@single)
Article ID: W14968