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

Directory and Deltree UDFs

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

Recursive Directory List

 Keywords: Recursive Recurse Folders Directory List DirItemize DirItemizeEX  

#DefineFunction DirItemPathRecursive(fp)
      If StrSub(fp,StrLen(fp),1)!="\" Then fp=fp:"\"
      dl = DirItemize(fp:"*")
      fl = fp
      dlc = ItemCount(dl, @TAB)
      For i = 1 To dlc
        t = DirItemPathRecursive(fp:ItemExtract(i, dl, @TAB):"\")
        If t > "" Then fl = ItemInsert(t, -1, fl, @TAB)
      Next i
      Return fl
#EndFunction

x = DirItemPathRecursive("C:\WINDOWS")
AskItemlist('dirs', x, @TAB, @UNSORTED, @SINGLE)
Exit

Article ID:   W18357
Filename:   Recursive Directory List.txt
File Created: 2008:11:20:15:10:50
Last Updated: 2008:11:20:15:10:50