Search these areas:
Support Forums
Product Info

-DataWeb: What's New
-Creating an Application
-The DataWeb Designer
-Application Management
-Data Tables
-Data Tables
-Data Analysis
-Object Model
-Full-Text Search
-Domain and Email Hosting
-HotBlock Modules
-Account Management
-New Responsive UI Module

DataWeb Help
Support Forums
Script Library
Knowledge Base

Home > Support

Script Library

  List Folders
  chubbard posted this script:
  The following function takes a path to a folder in the web, and prints its subfolders recursively.

webcall function listFolders(szParent)
//if no folder is passed in, use root.
    szParent = "/";

    //split folder path into parts
    var aPart = szParent.split("/");
    //get Folder object
    var fParent = Folder.getExisting(szParent);
    //get array of subfolders
    var aChild = fParent.Folders.getObjects();
    //write out subfolders beneath this folder
    for(var i = 0; i < aChild.length; i++)
        for(var j = 0; j < aPart.length - 1; j++)

        response.write("- " + aChild[i].name + "<br>");
        //call function recursively.
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
DataWeb, 720 North 10th Street, A #145, Renton, Washington 98057 *425-583-5970* Fax 484-770-4706* Email Us