Je soubor spustiteln² ?

Funkce:
Function IsExecFile(ByVal sFileName As String) As Boolean 

   Dim sExt As String 

   On Error Resume Next 

   ' otestujeme existenci souboru 
   If Not (GetAttr(sFileName) And vbDirectory) = 0 Then Exit Function 
   ' otestujeme poslednφ 4 znaky 
   sExt = LCase$(Right$(sFileName, 4)) 
   IsExecFile = (sExt = ".exe") Or (sExt = ".com") Or (sExt = ".bat") _
     Or (sExt = ".pif") 

End Function

Zp∞t

Autor: The Bozena