Function GetFilenameFromPath(ByVal strPath As String) As String ' npr. 'c:\winnt\win.ini' vraca 'win.ini' If Right$(strPath, 1) <> "\" And Len(strPath) > 0 Then GetFilenameFromPath = GetFilenameFromPath(Left$(strPath, Len(strPath) - 1)) + Right$(strPath, 1) End If End Function