# Expression get tag parent folder path as string

**URL:** <https://forum.inductiveautomation.com/t/expression-get-tag-parent-folder-path-as-string/32086>\
**Category:** Ignition Early Access\
**Created:** [February 10, 2020, 7:46am UTC](https://forum.inductiveautomation.com/t/expression-get-tag-parent-folder-path-as-string/32086 "2020-02-10T07:46:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Esn](https://avatars.discourse-cdn.com/v4/letter/e/91b2a8/32.png) [@Esn](https://forum.inductiveautomation.com/u/Esn)\
**Post date:** [February 10, 2020, 7:46am UTC](https://forum.inductiveautomation.com/t/expression-get-tag-parent-folder-path-as-string/32086/1 "2020-02-10T07:46:41Z")

</div>

Hi,

I’m trying to make an expression that needs the tags parent folder path.

Is it possible to get that somehow?

{PathToParentFolder} and {[.]} doesn’t seem to work.

It’s not a UDT. It’s just an expression tag inside a folder.

Running Ign v. 8.0.3.

Thanks

---

<div class="post-metadata">

**Author:** ![accyroy](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/accyroy/32/3386_2.png) [@accyroy](https://forum.inductiveautomation.com/u/accyroy)\
**Post date:** [February 10, 2020, 12:07pm UTC](https://forum.inductiveautomation.com/t/expression-get-tag-parent-folder-path-as-string/32086/2 "2020-02-10T12:07:37Z")

</div>

Sounds like you really should be using a UDT for this, but you can get what you want by using string manipulation:

```auto
left({[.]mytag.Path},lastIndexOf({[.]mytag.Path},{[.]mytag.Name}))

```

We are getting the complete tag path and then removing the tag name from the end.

---

<div class="post-metadata">

**Author:** ![Chris\_Bingham](https://avatars.discourse-cdn.com/v4/letter/c/e5b9ba/32.png) [@Chris\_Bingham](https://forum.inductiveautomation.com/u/Chris_Bingham)\
**Post date:** [November 6, 2023, 8:00pm UTC](https://forum.inductiveautomation.com/t/expression-get-tag-parent-folder-path-as-string/32086/3 "2023-11-06T20:00:02Z")

</div>

A couple of options that seem to work in Ignition 8.1.30 tag expressions:

```auto
{[.].Path} // Path to parent folder
{[.].Name} // Name of parent folder

```
