# FoldItem problem

**URL:** <https://forum.xojo.com/t/folditem-problem/87948>\
**Category:** Getting Started\
**Created:** [March 26, 2026, 8:35pm UTC](https://forum.xojo.com/t/folditem-problem/87948 "2026-03-26T20:35:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![LiamP](https://forum.xojo.com/user_avatar/forum.xojo.com/liamp/32/543_2.png) [@LiamP](https://forum.xojo.com/u/LiamP)\
**Post date:** [March 26, 2026, 8:35pm UTC](https://forum.xojo.com/t/folditem-problem/87948/1 "2026-03-26T20:35:31Z")

</div>

on MacOS. I have an attached drive identified as WPP with several folders on it but the one of interest is “Images”. I want the user to browse the contents of a subfolder of Images (called “WPPThumbnails”.

in a Method I have the following code (along with some other stuff I have deleted, but this is the essential part)

var fiThumbs As FolderItem  
var fiTemp As FolderItem  
var dlgImage As OpenFileDialog  
var sPath As String

sPath = “/Volumes/WPP/Images/WPPThumbnails/” (sPath is actually calculated - not a constant)  
fiTemp = New FolderItem(sPath, FolderItem.PathModes.Native)  
dlgImage.InitialFolder = fiTemp

I then get a nil Exception ( \*\*An exception of class NilObjectException was not handled.\*). Except when I examine fiTemp it’s not nil. It points to the correct folder. Also not sure what the “count” property of the folder item is but if it is the number of items in the folder then it is correct. Its value is 1 and there is one item in the folder.

all help greatly appreciated

---

<div class="post-metadata">

**Author:** ![Jerry\_Fritschle](https://forum.xojo.com/user_avatar/forum.xojo.com/jerry_fritschle/32/223_2.png) [@Jerry\_Fritschle](https://forum.xojo.com/u/Jerry_Fritschle)\
**Post date:** [March 26, 2026, 8:41pm UTC](https://forum.xojo.com/t/folditem-problem/87948/2 "2026-03-26T20:41:15Z")

</div>

How is the Folderitem.Exists property for all directories in the path?

---

<div class="post-metadata">

**Author:** ![Jeff\_Tullin](https://forum.xojo.com/user_avatar/forum.xojo.com/jeff_tullin/32/693_2.png) [@Jeff\_Tullin](https://forum.xojo.com/u/Jeff_Tullin)\
**Post date:** [March 26, 2026, 8:42pm UTC](https://forum.xojo.com/t/folditem-problem/87948/3 "2026-03-26T20:42:52Z")

</div>

var dlgImage As **NEW** OpenFileDialog

---

<div class="post-metadata">

**Author:** ![LiamP](https://forum.xojo.com/user_avatar/forum.xojo.com/liamp/32/543_2.png) [@LiamP](https://forum.xojo.com/u/LiamP)\
**Post date:** [March 26, 2026, 9:09pm UTC](https://forum.xojo.com/t/folditem-problem/87948/4 "2026-03-26T21:09:34Z")

</div>

The exist property was true. The solution was adding NEW to the openfiledialog.

Thanks Jerry
