it's easy to understand, where's the difficulty ?
it reads the name, but it begins from the end ; it continue to read until the letter is "." => all the others letters it has read are the format
but I think you should add something, Phaelax, because your code may crash the application
function getFtpExtension(name$ as string)
length = len(name$)
i = length
while (mid$(name$, i) <> ".") or i>0
dec i
endwhile
if i>0 then ext$ = right$(name$, length - i) else ext$=""
endfunction ext$
so, if there isn't any . in your file, the code won't crash
The sleeper must awaken !