For you, Doc, anything...

Code:
; Build an array with possible filename examples. Since "." is a

; valid character in a filename, one cannot simply do a Split on
; all "." delimiters. Also, a filename does not necessarily have
; to have an extension.
;
$files = "file.txt", "file.1.txt", "file.1.2.txt", "file1"

; Enumerate the array.
For Each $file in $files
Iif( ; There are two possible returns, one with a file extension
; and one without. Therefore the Iif function is a good choice.
Instr($file,".")
; First parameter of Iif. If there is a "." in the filename,
; the characters after will be considered the file extension.
,Left($file,InStrRev($file,".")-1)
; Second parameter of Iif, which is the return value if parameter
; one is TRUE. Uses InStrRev to find the first "." going from
; right to left, subtracts one from the return value of InStrRev,
; then uses that value to return all of the characters to the Left
; of that value.
,$file) ?
; Third parameter of Iif, this is the return value if parameter
; one is FALSE. Since there is no "." character in the string,
; simply return the filename.
Next