TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Daryl Willis
from: Frank Adam
date: 1996-03-30 03:13:00
subject: attributes

G'Day Daryl,
 
-=> Quoting Daryl Willis to All <=-
 DW> Ok using _dos_findfirst() I can get all the info on a file that I
 DW> need, however, the attrib returns usually 32 for archive  or 
 DW> 19 for a hidden read only, I,m sure I can write something to easily 
 DW> see what bits are set in 19 but I feel it will not be the best way to
 DW> do this, If someone could provide a small example of how
 DW> to do this or even demonstrate the best way I would again 
 DW> be appreciative
This is how it works.

Read only  = 1
Hidden     = 2
System     = 4
Label      = 8
Directory  = 16
Archive    = 32

You can check a file for any combination of the above attribs by adding up
the values.
Eg: if(f.ff_attrib == RDONLY | SYSTEM | HIDDEN) leaveitalone();

Btw, if you get 19 it won't be a file, it'll be a +R+H directory

If you want a recursive file finder example just yell, or look at whereis
in snippets.
            

  L8r Frank (fadam{at}ozemail.com.au).
  
___ Blue Wave/DOS v2.21

--- Maximus 3.01
* Origin: The Software Parlour (3:635/544)
SEEN-BY: 50/99 78/0 620/243 623/630 632/349 635/503 544 727 711/401 409 410
SEEN-BY: 711/413 430 808 809 932 934 712/515 713/888 714/906 800/1 7877/2809
@PATH: 635/544 50/99 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.