Joe Strazzere - All Things Quality

Visit my new blog at http://strazzere.blogspot.com/


December 1, 2005 - WinTask - GetFileAttributes

Posted in WinTask

'
' GetFileAttributes
'

dim a as unsigned

file$="C:\msdos.sys"

a=External("kernel32","GetFileAttributesA",file$)

f$=""

if (a & (32)) <> 0 then
  f$=f$+"  Archive"+crlf
endif

if (a & (800 * 256)) <> 0 then
  f$=f$+"  Compressed"+crlf
endif

if (a & (16)) <> 0 then
  f$=f$+"  Directory"+crlf
endif

if (a & (2)) <> 0 then
  f$=f$+"  Hidden"+crlf
endif

if (a & (8 * 16)) <> 0 then
  f$=f$+"  Attribute-less"+crlf
endif

if (a & (1)) <> 0 then
  f$=f$+"  Read-Only"+crlf
endif

if (a & (64)) <> 0 then
  f$=f$+"  System"+crlf
endif

msgbox("Attributes for "+file$+":"+crlf+crlf+f$,0,"GetFileAttributes")


 


<- Last Page :: Next Page ->

About Me

A gathering place for information and ideas about Quality Assurance, Testing, and other useful topics.

Problems cannot be solved by the same level of thinking that created them. - A. Einstein

Search This Site

Translate This Site

RSS Feed

Subscribe

Twitter

@jstrazzere

Categories

Life
QA
Sports
Tools
WinTask
Work in General

What I'm Reading Now