|
| |
Code Sample: GetFileExt Function
|
Public
Function GetFileExt(FileName)
'=============================================
'PURPOSE: Returns the extension of the file
'PARAMS: FileName File name with or without
' a full path
'RETURNS: File Extension
'=============================================
Dim Position
For Position = Len(FileName) To 1 Step -1
If
InStr(".", Mid(FileName, Position, 1)) Then Exit For
Next
GetFileExt = Right(FileName, Len(FileName) - Position)
End Function |
|
|