What if there's more than one occurrence of the name (in the file) ... this will produce multiple occurences ... would you want just the last occurence ? or the first ? or an array of occurences ? Or maybe you know before hand that there will ALWAYS be only one occurence ?

-Shawn

p.s.

Might want to give the Pipe UDF a quick try, it submits a command to the shell and automatically redirects the output to an internal kixtart array. Here's an example:

Script Code:




$occurences = pipe('find /i "franse" c:\test.dat')


if ubound($occurences)
for $i=1 to ubound($occurences)
?"found=" $occurences[$i]
next
endif


Here's a link to Pipe()

-Shawn

[ 08 January 2002: Message edited by: Shawn ]