I use DIRPLUS from the UDF library. It turns the files and folders into arrays which are far easier to work with.

Dirplus() -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=82153#Post82153

How to use UDFs -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=81943#Post81943

The rest of the UDFs are here -
http://www.kixtart.org/forums/ubbthreads.php?ubb=postlist&Board=7&page=1

for example
 Code:
for each $folder in dirplus("%userprofile%","/ad")
  ? $folder
  for each $file in dirplus($folder,"/-ad")
    ;? " " + $file
  next
next
_________________________
(... better days ahead)