No, I wouldn't have asked about quotes, because that's a normal use for them.
Laine also said something in this thread about that technique not working reliably anymore. It's apparently sensitive to the specific extension?
Hmm, I've never had it fail on me.
In any case, (text 1 through -5 of name) works well enough.
So long as the extension is always three characters, which, if you're using it only on .avi files, it would be.
Here's a more generic solution that takes into account the possibility of having more than one period in the file name, and that will work with a name extension of any length. The script must first check to see whether there is a name extension before calling this routine
set text item delimiters to ""
set foo to "abc.def.123"
set foo to reverse of characters of foo as text
set text item delimiters to "."
set foo to rest of text items of foo as text
set text item delimiters to ""
set foo to reverse of characters of foo as text
-- Michelle
--
Sex is a lot like bridge. If you don't have a good partner, then you'd better have a good hand.