I'm trying to simply add the choosen (by the Dialog.FileBrowse) file path to a label:
If the choosen file is a .exe, or .doc or any other extension this works fine, but if the user chooses a .lnk (example "my_program.lnk") the label gets "C:\program files\my_program.exe" instead of "my_program.lnk" that is the result I expect and that I need.Code:my_file = Dialog.FileBrowse(true, "Choose a file, program, document or bookmark", Working_drive..":\\", "All files (*.*)|*.*|", "", "", false, true); if my_file[1] ~= "CANCEL" and my_file ~= "nil" then Label.SetText("Label1", my_file[1]); end
The same problem happens if the user chooses a .url (favorite link), the result string is "C:\temp\temporary internet files\Content.IE5\X4RBTE0\www.website[1])"
Is there anything wrong with the code or there is a workaround for this?
Many thanks for your kind attention.




Reply With Quote