Frequently Asked Questions

Mar 29, 2024 - 03:41am

 [F] Frequently Asked Questions  / Operational Questions  / Macros and Templates  / WCTL  /

Recursing through a folder's items.

Rate This FAQ
 (Not yet rated)

Created On: 18 Nov 1999 10:36 am
Last Edited: 18 Nov 1999 10:36 am

Question Printer Friendly

How to recurse through a folder.

Answer

To do something recursively in WCTL you use pathSelect() to get a list of items, then split items off the list and examine them. If the item is a folder, you use pathSelect() to get a list of items.

Use this technique with discretion. Routinely recursing through a large database may have a significant negative effect on performance. For example you don't want to do this just so you can show the user the total message counts in the top level folders or something. Doing this in a macro the sysop calls occasionally is more reasonable.