You can search file on the folder tree.

The System.ThreadDir(path_to_dir) function creates thread. Thread scans all subdirectories and to call "callback function" (event) from your script: EndThreadDir(id, files)

Here's an example that find the temporary files:
// JScript syntax
var id = System.ThreadDir("C:\\Temp");
Window.TextOut(1, 50, 30, "(Start) Thread Id: " + id);


function EndThreadDir(id, files) {
  Window.TextOut(1, 50, 50, "(End) Thread Id: " + id);
  var a = new VBArray(files);
  var b = a.toArray();
  for (var i=0; i<b.length; i++) 
       Window.TextOut(1, 50, 70 + 20 * i, i+ ": " + b[i]);
  Window.UpdateWindow();
};
'VBScript syntax
id = System.ThreadDir("C:\Temp")
Window.TextOut 1, 50, 30, "(Start) Thread Id: " & id

Function EndThreadDir(id, safearray) 
 Window.TextOut 1, 50, 50, "(End) Thread Id: " & id
 i = 0
 For Each file In safearray
     Window.TextOut 1, 50, 70 + 20 * i, CStr(file)
     i = i + 1
 Next
 Window.UpdateWindow
End Function
content
The advanced scripting shell. It is not wscript.exe!
JScript and VBScript are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.