# Possible to resolve shortcut paths?

**URL:** <https://forum.xojo.com/t/possible-to-resolve-shortcut-paths/10864>\
**Category:** Windows\
**Created:** [September 11, 2013, 7:39pm UTC](https://forum.xojo.com/t/possible-to-resolve-shortcut-paths/10864 "2013-09-11T19:39:38Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dale\_Arends](https://forum.xojo.com/user_avatar/forum.xojo.com/dale_arends/32/442_2.png) [@Dale\_Arends](https://forum.xojo.com/u/Dale_Arends)\
**Post date:** [September 11, 2013, 7:39pm UTC](https://forum.xojo.com/t/possible-to-resolve-shortcut-paths/10864/1 "2013-09-11T19:39:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Joachim\_Kuno](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@Joachim\_Kuno](https://forum.xojo.com/u/Joachim_Kuno)\
**Post date:** [September 11, 2013, 7:52pm UTC](https://forum.xojo.com/t/possible-to-resolve-shortcut-paths/10864/2 "2013-09-11T19:52:36Z")

</div>

FolderItem.TrueItem.NativePath

---

<div class="post-metadata">

**Author:** ![Dale\_Arends](https://forum.xojo.com/user_avatar/forum.xojo.com/dale_arends/32/442_2.png) [@Dale\_Arends](https://forum.xojo.com/u/Dale_Arends)\
**Post date:** [September 12, 2013, 6:03pm UTC](https://forum.xojo.com/t/possible-to-resolve-shortcut-paths/10864/3 "2013-09-12T18:03:39Z")

</div>

> [@32971:@Joachim Kuno](#):
>
> FolderItem.TrueItem.NativePath

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

---

<div class="post-metadata">

**Author:** ![DetlefK](https://forum.xojo.com/user_avatar/forum.xojo.com/detlefk/32/23653_2.png) [@DetlefK](https://forum.xojo.com/u/DetlefK)\
**Post date:** [September 12, 2013, 6:17pm UTC](https://forum.xojo.com/t/possible-to-resolve-shortcut-paths/10864/4 "2013-09-12T18:17:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Dale\_Arends](https://forum.xojo.com/user_avatar/forum.xojo.com/dale_arends/32/442_2.png) [@Dale\_Arends](https://forum.xojo.com/u/Dale_Arends)\
**Post date:** [September 12, 2013, 6:26pm UTC](https://forum.xojo.com/t/possible-to-resolve-shortcut-paths/10864/5 "2013-09-12T18:26:06Z")

</div>

> [@33181:@Detlef Kahner](#):
>
> 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…

---

<div class="post-metadata">

**Author:** ![Tim\_Hare](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_hare/32/176_2.png) [@Tim\_Hare](https://forum.xojo.com/u/Tim_Hare)\
**Post date:** [September 12, 2013, 7:26pm UTC](https://forum.xojo.com/t/possible-to-resolve-shortcut-paths/10864/6 "2013-09-12T19:26:52Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![Tim\_Hare](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_hare/32/176_2.png) [@Tim\_Hare](https://forum.xojo.com/u/Tim_Hare)\
**Post date:** [September 12, 2013, 7:32pm UTC](https://forum.xojo.com/t/possible-to-resolve-shortcut-paths/10864/7 "2013-09-12T19:32:06Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![Dale\_Arends](https://forum.xojo.com/user_avatar/forum.xojo.com/dale_arends/32/442_2.png) [@Dale\_Arends](https://forum.xojo.com/u/Dale_Arends)\
**Post date:** [September 13, 2013, 6:04pm UTC](https://forum.xojo.com/t/possible-to-resolve-shortcut-paths/10864/8 "2013-09-13T18:04:43Z")

</div>

[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. 🙂

---

<div class="post-metadata">

**Author:** ![claudia\_orona\_flores](https://forum.xojo.com/letter_avatar_proxy/v4/letter/c/c57346/32.png) [@claudia\_orona\_flores](https://forum.xojo.com/u/claudia_orona_flores)\
**Post date:** [November 20, 2013, 10:06pm UTC](https://forum.xojo.com/t/possible-to-resolve-shortcut-paths/10864/9 "2013-11-20T22:06:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 4:50pm UTC](https://forum.xojo.com/t/possible-to-resolve-shortcut-paths/10864/10 "2020-10-29T16:50:44Z")

</div>


