If you need to include subdirs, there is the full-featured DirPlus() UDF that Bryce wrote, otherwise you could use my lean DDir() UDF to enum dirs one level deep.
Code:
Function DDir($Start)
;Does not support WildCards and FileSpec must end with \
Dim $TmpArray[0], $Dir, $Index, $
$Dir = Dir($Start)
While @Error = 0
If $Dir <> '.' And $Dir <> '..' And GetFileAttr($Start + $Dir) & 16
$TmpArray[$Index] = $Dir
$Index = $Index + 1
ReDim Preserve $TmpArray[$Index]
EndIf
$Dir = Dir()
Loop
If Ubound($TmpArray)
ReDim Preserve $TmpArray[Ubound($TmpArray)-1]
EndIf
$DDir = $TmpArray
EndFunction
Either one returns an array and using a FOR loop, you can iterate through them.
Code:
For Each $Folder in DDir('C:\ParentFolder\')
;do stuff
Next
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.