'= , =, =, =, =, =, =, = ,=, = #include "crt.bi" #define ArgC ((*__p___argc())-1) Var Entry="", Attribute=0 Dim What(1) As ZString Ptr={@"file", @"folder"} Dim Really(1) As ZString Ptr={@" doesn't exist", @" exists"} Function Attrib(FileSpec As String) As Integer Var IsAttribute=0, s="" s=Dir(FileSpec, &H7F, @IsAttribute) Return IsAttribute End Function Function Exist(FileSpec As String) As Integer Return Attrib(FileSpec)<>0 End Function Function IsDir(FileSpec As String) As Integer Return (Attrib(FileSpec) And &H10)<>0 End Function Function IsFile(FileSpec As String) As Integer Return (Attrib(FileSpec) And &H10)=0 End Function Print !"GetAttrib.Bas 2006 by ytwinky, MD\nPlayground for the dir-statement" Print !"tested with FB0.17f using FB0.4.6\nArgC=" &ArgC Do Input"EntryName:", Entry If Entry<>"" Then Attribute=Attrib(Entry) Print "Attribute of " &Entry &" is 0x" & Hex(Attribute) Print Entry &*Really(Abs(Exist(Entry))) If Attribute Then Print Entry &" is a "; *What(Abs(IsDir(Entry))) Print Entry &" is a "; *What(1-Abs(IsFile(Entry))) End If End If Loop Until Entry="" End