# File Explorer choosing a file vs a directory - how to tell?

**URL:** <https://forum.inductiveautomation.com/t/file-explorer-choosing-a-file-vs-a-directory-how-to-tell/26266>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [July 3, 2019, 3:24pm UTC](https://forum.inductiveautomation.com/t/file-explorer-choosing-a-file-vs-a-directory-how-to-tell/26266 "2019-07-03T15:24:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [July 3, 2019, 3:24pm UTC](https://forum.inductiveautomation.com/t/file-explorer-choosing-a-file-vs-a-directory-how-to-tell/26266/1 "2019-07-03T15:24:29Z")

</div>

I have a window where a user can select a file to attach to a message thread. I am using the file Exporer component to allow them to select the file and then click a button to confirm that is the file they want. But at the moment, I can’t tell if they only chose a folder or a file, and I need to make sure it’s a file. How can I do this? I thought maybe just searching the path string for a `.` and while that seems like it would work, also seems like a bad way to go about this. Any suggestions? Am using Ignition 7.9.1.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [July 3, 2019, 3:26pm UTC](https://forum.inductiveautomation.com/t/file-explorer-choosing-a-file-vs-a-directory-how-to-tell/26266/2 "2019-07-03T15:26:55Z")

</div>

So while it doesn’t show up in the property editor, there is a boolean property “Selected Path is File” you can use in scripting and expressions so that will do it.
