Possible to resolve shortcut paths?

I have an situation in an app where the user can drop a file on a target (canvas or listbox) and I need to be able to determine the actual path. This works fine for actual entities but not if the user drops an alias (shortcut). Is there a way to resolve the path to the object of the shortcut?

  • Dale

FolderItem.TrueItem.NativePath

Unfortunately, that only works on OSX and I’m running Windows 7 for this app.

Seems the Prefix of the NativePath is missing or the Prefix needs to be added to the NativePath, before working with it.

Huh? I’m not sure what you are saying. What prefix? NativePath is the full path to the file/folder/alias(shortcut). It includes the drive designation and all of the intermediate locations. (A file on a network server may register differently but as I need to keep on the local machine, network drives are not an issue.)

The docs state that for Linux and Windows, FolderItem.TrueItem is the same as FolderItem.Item, which does not resolve shortcuts on Windows. Hence my problem…

One way to do it is to create a second folderitem from the first.

dim resolvedItem as FolderItem
if originalItem.Alias then
   resolvedItem = GetFolderItem(originalItem.AbsolutePath)
end

Or if you don’t care about retaining the original, and just want a resolved folderitem regardless of what was dropped,

if originalItem.Alias then originalItem = GetFolderItem(originalItem.AbsolutePath)

[quote=33194:@Tim Hare]

if originalItem.Alias then originalItem = GetFolderItem(originalItem.AbsolutePath) [/quote]

Thanks, Tim. That does it. I feel real silly to have not been able to figure that out but then I feel that way often.

BTW, AbsolutePath has been deprecated. :slight_smile:

Hello!

I comment the same issue but in mac, on win attach a file and send it by email and on mac it does not work.