The following should work:
code:

; file you are searching for
$filename = "anyfilename.exe"
; directory to start your search
$startdir = "c:\"
; temporary file for search results
$tmpfile = "c:\temp\results.txt"

; write search results to temporary file.
CD "$startdir"
SHELL "cmd.exe /c dir /s /b $filename > $tmpfile"

; read results from temporary file.
OPEN(1,$tmpfile,2)
$string = READLINE(1)
WHILE @ERROR = 0

; split the result in path and filename.
$path = ""
$file = $string
WHILE INSTR($file,"\")
$path = $path + SUBSTR($file,1,INSTR($file,"\"))
$file = SUBSTR($file,INSTR($file,"\")+1,LEN($file))
LOOP

; $file = the filename
; $path = the path (including a backslash at the end).
; use the following line to remove the final backslash,
; but not when te result is the root of a drive.
; IF (LEN($path) > 3) $path = SUBSTR($path,1,LEN($path)-1) ENDIF
;
; write here what you want to do with the results.

; read the next result.
$string = READLINE(1)
LOOP
CLOSE(1)
DEL $tmpfile


------------------
With kind regards,
Taco Ditiecher.