# How to get a NativePath String --\> Folderitem?

**URL:** <https://forum.xojo.com/t/how-to-get-a-nativepath-string-folderitem/17404>\
**Category:** General\
**Created:** [June 20, 2014, 1:05pm UTC](https://forum.xojo.com/t/how-to-get-a-nativepath-string-folderitem/17404 "2014-06-20T13:05:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Cotrone](https://forum.xojo.com/user_avatar/forum.xojo.com/mike_cotrone/32/19940_2.png) [@Mike\_Cotrone](https://forum.xojo.com/u/Mike_Cotrone)\
**Post date:** [June 20, 2014, 1:05pm UTC](https://forum.xojo.com/t/how-to-get-a-nativepath-string-folderitem/17404/1 "2014-06-20T13:05:14Z")

</div>

Hi everyone,

In the below test code I am trying to load a native path string into a folderitem easily 🙂 I am searching through the folderitem methods and can’t quite find what i am looking for. Here is my code I am trying to simply load the “UserSelectedPath” string into a new Folderitem.

```auto
  Dim dlg as New OpenDialog
  Dim AddLocal_ICP_LogFolder as FolderItem
  dlg.InitialDirectory=SpecialFolder.UserHome.Child(AddICPLogBaseDir).Child(AddICPLogSubDir1)

  AddLocal_ICP_LogFolder=dlg.ShowModal()

  If AddLocal_ICP_LogFolder <> Nil then
    ICP_Log_NameString = dlg.Item(0).Name
    UserSelectedPath = dlg.Item(0).NativePath
// Here I need to load UserSelectPath string into a new Folderitem

  End if
```

Any pointers would be very much appreciated!

Thanks  
Mike

---

<div class="post-metadata">

**Author:** ![DaveS](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://forum.xojo.com/u/DaveS)\
**Post date:** [June 20, 2014, 1:09pm UTC](https://forum.xojo.com/t/how-to-get-a-nativepath-string-folderitem/17404/2 "2014-06-20T13:09:50Z")

</div>

Well if UserSelectedPath is a STRING, and dlg.ITEM(0) is a folderitem already (since you are extracting NATIVE PATH)

why not just say myFolder=dlg.Item(0)

assign a folderitem to a folderitem?

---

<div class="post-metadata">

**Author:** ![Mike\_Cotrone](https://forum.xojo.com/user_avatar/forum.xojo.com/mike_cotrone/32/19940_2.png) [@Mike\_Cotrone](https://forum.xojo.com/u/Mike_Cotrone)\
**Post date:** [June 20, 2014, 1:11pm UTC](https://forum.xojo.com/t/how-to-get-a-nativepath-string-folderitem/17404/3 "2014-06-20T13:11:13Z")

</div>

Dave… Perfect! 🙂 Once again I was overcomplicating my workflow 🙂 Thank you very much!

---

<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, 5:16pm UTC](https://forum.xojo.com/t/how-to-get-a-nativepath-string-folderitem/17404/4 "2020-10-29T17:16:55Z")

</div>


