' Collection of code snippets by Arne Vajhøj ' posted to eksperten.dk, usenet and other places (2002-now) Function extrem(fnm) For i = Len(fnm) To 1 Step -1 If Mid(fnm, i, 1) = "." Then extrem = Left(fnm, i-1) Exit For End If Next End Function WScript.Echo extrem("filnavn.jpg") WScript.Echo extrem("filnavn.jpeg")