how to get the filename extesion