# List of folders, ignore folders in UDT

**URL:** <https://forum.inductiveautomation.com/t/list-of-folders-ignore-folders-in-udt/65996>\
**Category:** Ignition\
**Tags:** ignition81, scripting, perspective\
**Created:** [November 2, 2022, 2:45pm UTC](https://forum.inductiveautomation.com/t/list-of-folders-ignore-folders-in-udt/65996 "2022-11-02T14:45:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [November 2, 2022, 2:45pm UTC](https://forum.inductiveautomation.com/t/list-of-folders-ignore-folders-in-udt/65996/1 "2022-11-02T14:45:06Z")

</div>

I would like to get a list of tag folders, which is simple enough using `system.tag.browse`.  
[https://docs.inductiveautomation.com/display/DOC81/system.tag.browse](https://docs.inductiveautomation.com/display/DOC81/system.tag.browse)  
However, I don't want folders that are in UDT instances. Does anyone have a clever way to do this?

Is there a way to know that a folder is part of an instance? If you try to delete a folder in an instance, the designer will prompt you that the entire instance will be deleted, so it knows somehow, just not sure how to tell in a script.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [November 2, 2022, 2:51pm UTC](https://forum.inductiveautomation.com/t/list-of-folders-ignore-folders-in-udt/65996/2 "2022-11-02T14:51:10Z")

</div>

I would think that you would need to build your own recursive browse, since I don't know of a way to set the filter options for an inversion.

You could though do your own recursive browse and only recurse if the TagType is not a UDT.

If I have a little time later, I will see if I can write up a script, though I am sure you're capable of it. Also not sure I would call this "clever".

---

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [November 2, 2022, 2:53pm UTC](https://forum.inductiveautomation.com/t/list-of-folders-ignore-folders-in-udt/65996/3 "2022-11-02T14:53:14Z")

</div>

Have you tried the new tag report tool?

Set up a query using the GUI, and it can generate the script for you. No recursion required.

[https://docs.inductiveautomation.com/display/DOC81/Tag+Report+Tool](https://docs.inductiveautomation.com/display/DOC81/Tag+Report+Tool)

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [November 2, 2022, 3:00pm UTC](https://forum.inductiveautomation.com/t/list-of-folders-ignore-folders-in-udt/65996/4 "2022-11-02T15:00:20Z")

</div>

I didn't see a way to return any folder in the tag report tool, so I really didn't try much harder after that.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [November 2, 2022, 10:07pm UTC](https://forum.inductiveautomation.com/t/list-of-folders-ignore-folders-in-udt/65996/5 "2022-11-02T22:07:36Z")

</div>

It looks like the latest version has options for udt members and udt definitions in the tag report tool. I will upgrade and try it out.

Edit, I didn't realize it was under property. The screenshot will grab all folders and ignore UDTs.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/9/698571494753bbf17ee0bd5a309d3b9ee1b0499c.png)
