WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

File Searcher
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Get a List of Subfolders

Keywords:   list subfolders searcher

  1. If just need a list of the immediate subfolders....Use DirItemize("*.*")
  2. If you need a list of all the subfolders all the way down...
    AddExtender("wsrch34I.dll")
    topdir="c:\incoming"
    ;xyz used as it is an uncommon extension
    ;we're not really looking for files
    handle=srchInit(topdir, "*.xyz", "", "", 16+32)
    
    dirlist=""
    
    while 1
       thisdir=srchNext(handle)
       if thisdir=="" then break
       ;make sure it a dir and not an xyz file
       if strsub(thisdir,strlen(thisdir),1) != "\" then continue
       if dirlist=="" then dirlist=thisdir
       else dirlist=StrCat(dirlist,@tab,thisdir)
    endwhile
    
    AskItemList("subfolders",dirlist,@tab,@unsorted,@single)
    

    Article ID:   W14552
    
    Filename:   Get a List of Subfolders.txt
    File Created: 2001:03:01:15:33:50
    Last Updated: 2001:03:01:15:33:50