How to get multiple file attributes
Posted: Mon May 05, 2003 7:23 am
In the PB help, it explains how to return just one attribute using the & symbol. How do you return multiple attributes with pb this way?
I use the below code to return a single attribute from a file but if a file has more than one attribute set; or none; I don't know how to do it.
And I set a text mask for the user as you can see:)
I use the below code to return a single attribute from a file but if a file has more than one attribute set; or none; I don't know how to do it.
And I set a text mask for the user as you can see:)
Code: Select all
Mattribute = DirectoryEntryAttributes()
If Mattribute & #PB_FileSystem_Normal : Attributes.s = "-----"
ElseIf Mattribute & #PB_FileSystem_ReadOnly : Attributes.s = "R----"
ElseIf Mattribute & #PB_FileSystem_Archive : Attributes.s = "-A---"
ElseIf Mattribute & #PB_FileSystem_System : Attributes.s = "--S--"
ElseIf Mattribute & #PB_FileSystem_Hidden : Attributes.s = "---H-"
ElseIf Mattribute & #PB_FileSystem_Compressed : Attributes.s = "----C"
EndIf