p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_howto thread: Separate fileattribute.


Message #1 by "Johan Dahlgren" <johan.dahlgren@c...> on Thu, 15 Mar 2001 11:44:09 +0100
The attributes are:
1 - Read-only
2 - Hidden
4 - System
32 - Archive
1024 - Alias
2048 - Compressed

So you can use the bitwise operation:

if file.Attributes and 1 then
    ' It's a read onlyfile
elseif file.Attributes and 2 then
    ' hidden


etc...

Regards,
Wally


>From: "Johan Dahlgren" <johan.dahlgren@c...>
>Reply-To: "How To" <proasp_howto@p...>
>To: "How To" <proasp_howto@p...>
>Subject: Separate fileattribute.
>Date: Thu, 15 Mar 2001 11:44:09 +0100
>
>Is there anyone that have any tips on how to separate fileattributes?
>
>Im using FileSystemObject and retreive Attribute for ex. a file a get a
>summerized value for all attributes.
>
>Ex if Archive + Hidden it returns 34.
>Archive = 32
>Hidden = 2
>
>I hope there is someone that understand what i mean and have any
>suggestion...
>
>/Johan Dahlgren
>
>

  Return to Index