Checking file attributes

Gordon McMillan gmcm at hypernet.com
Thu Oct 28 21:38:09 EDT 1999


mdperry_26 at my-deja.com writes:

> Is there an easy way in python to return the file attributes of a
> file in NT(i.e. hidden, system, archive, etc.).  I have been
> poking around the os.stat module and can return some file
> information but it doesn't look like you can derive any
> information about the attribute bits.  Any suggestions?

You want win32file.GetFileAttributes() which is part of Mark 
Hammond's Win32 extensions. Follow the Windows link from 
python.org's main page.
 


- Gordon




More information about the Python-list mailing list