May 02, 2024, 12:45:36 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


FLAG ATTRIBUTES FOR LISTING DIRECTORIES

Started by TexasPete, May 19, 2008, 07:02:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TexasPete

I was trying to find a listing of all the different flag attributes for listing files. I see on the forum that many use hex notation. I am not well versed in hex.
Has any one made a simply conversion listing so that I don,t have to learn hex.
Texas pete

billhsln

I am not sure this is all of them, but it should cover most:

setid "FILE_ATTRIBUTE_ARCHIVEFL",0x20
setid "FILE_ATTRIBUTE_COMPRESSEDFL",0x800
setid "FILE_ATTRIBUTE_DIRECTORYFL",0x10
setid "FILE_ATTRIBUTE_HIDDENFL",0x2
setid "FILE_ATTRIBUTE_NORMALFL",0x80
setid "FILE_ATTRIBUTE_READONLYFL",0x1
setid "FILE_ATTRIBUTE_SYSTEMFL",0x4
setid "FILE_ATTRIBUTE_TEMPORARYFL",0x100

Bill
When all else fails, get a bigger hammer.

TexasPete

Thank you bill every little bit helps!
Texas Pete

barry

Quote from: TexasPete on May 19, 2008, 07:02:29 AM
I was trying to find a listing of all the different flag attributes for listing files. I see on the forum that many use hex notation. I am not well versed in hex.
Has any one made a simply conversion listing so that I don,t have to learn hex.

Learning enough about hex to understand what you're seeing isn't difficult at all.  You don't have to be able to convert or do hex arithmetic in your head for this sort of thing.  You mostly have to be able to recognize hex numbers and sometimes to know which is larger.  Learning enough to do that should only take a few minutes.

Another very useful thing is to be able to understand which bits are set in a hex number, which is done by converting to binary.  Since each hex digit represents 4 binary digits which can only be in 1 of 16 patterns, memorizing 16 patterns of 4 ones and zeroes, which shouldn't take more than a few minutes since they're logically ordered, will make hex really easy to use without really understanding it as a number system.

I've told people about this before and most who have tried it have spent an hour or less and learned enough about hex numbers to make them very useful.  And they are very useful when you're programming.

That's not to say there's not a lot more to learn.  There is and it's also worth learning.  But that simple memorization will give you the most useful part without really learning it.

0000  0001  0010  0011 0100  0101  0110  0111 1000  1001  1010  1011 1100  1101  1110  1111

Barry

Jerry Muelver

I use binary to count up to, um, like 8Gig on my fingers. It's useful for keeping track of my gasoline purchases.

LarryMc

Jerry,
I got my disability check yesterday and walked down to the gas station and put a gallon of gas on layaway.

In 2 more months it will be all mine.

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library