My code using substr is even slower than Les' LEFT function. [Frown] You win Les. [Wink]

Time for a 10,000 iteration loop using each.
code:
Break ON
$file = "f.u.b.a.r.exe.txt"

$a = @ticks
for $i=1 to 10000
$basename = substr($file, 1, InStrRev($file, ".")-1)
next
$b=@ticks
? "HB = " + ($b-$a) + " ticks"

$a = @ticks
for $i=1 to 10000
$basename = Left($file,InStrRev($file,".")-1)
next
$b=@ticks
? "Les = " + ($b-$a) + " ticks"

HB = 591 ticks
Les = 550 ticks
_________________________
Home page: http://www.kixhelp.com/hb/