# FolderItem Strings?

**URL:** <https://forum.xojo.com/t/folderitem-strings/36524>\
**Category:** Getting Started\
**Created:** [March 9, 2017, 1:22am UTC](https://forum.xojo.com/t/folderitem-strings/36524 "2017-03-09T01:22:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Wilson1](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/e274bd/32.png) [@Daniel\_Wilson1](https://forum.xojo.com/u/Daniel_Wilson1)\
**Post date:** [March 9, 2017, 1:22am UTC](https://forum.xojo.com/t/folderitem-strings/36524/1 "2017-03-09T01:22:12Z")

</div>

All,

Just curious if there is a simpler way of creating a FolderItem, this seems a little esoteric and leads me to think i am not doing this the best way?

```
	Dim f as FolderItem
	f = Volume(0).Child("Users").Child("me"). Child("Desktop").Child("test.txt")

```

I would expect (knowing nothing of Xojo) that I should be able to do this, but doens’t seem to work.  
f.setPathAsString = “c:\users\me\desktop\test.txt”

Is there something I missed?

---

<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:** [March 9, 2017, 1:38am UTC](https://forum.xojo.com/t/folderitem-strings/36524/2 "2017-03-09T01:38:33Z")

</div>

no offense but the Language Ref is you friend. 🙂

> [@](#):
>
> result=GetFolderItem(path [,pathMode])

Just be careful and check for NIL and EXISTS when creating a FolderItem using this or any other method

---

<div class="post-metadata">

**Author:** ![Andrew\_Lambert](https://forum.xojo.com/user_avatar/forum.xojo.com/andrew_lambert/32/215_2.png) [@Andrew\_Lambert](https://forum.xojo.com/u/Andrew_Lambert)\
**Post date:** [March 9, 2017, 1:43am UTC](https://forum.xojo.com/t/folderitem-strings/36524/3 "2017-03-09T01:43:20Z")

</div>

For your specific case you should use the [SpecialFolder](http://documentation.xojo.com/index.php/SpecialFolder) class:

`Dim f as FolderItem
f = SpecialFolder.Desktop.Child("test.txt")`

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [March 10, 2017, 12:51pm UTC](https://forum.xojo.com/t/folderitem-strings/36524/4 "2017-03-10T12:51:17Z")

</div>

If you know the path use SpecialFolder and the FolderItem methods. If you don’t know the path use an OpenDialog.

Search the forum to see the nightmares people have with GetFolderItem and the solution usually being SpecialFolder and the FolderItem methods.

---

<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, 6:41pm UTC](https://forum.xojo.com/t/folderitem-strings/36524/5 "2020-10-29T18:41:02Z")

</div>


