or, use an array of folders for your "Dont scan" list.

Code:

$dontscan = "Program Files","C:\windows","c:\winnt"
$dirs=DirPlus("C:\","/ad")

for each $dir in $dirs
if ascan($dontscan) = -1
;the current folder is not in the dont scan list.

$Files=DirPlus($dir.path,"/S /a-d")
for each $file in $files
;do stuff
next
endif
next