How to Check Write Access of a Folder on Windows

Ayaskanta Swain ayaskanta.swain at altair.com
Fri Aug 12 12:41:04 CEST 2011


Hi,

 

I have a requirement where I need to check the write permissions on a
directory on Windows platform. I don't want to use the python function
os.access( ), since it does not work correctly on Windows. It is giving
incorrect results to me.

 

Another option of actually creating a temporary file inside the folder &
then deleting it to check whether the user has write permissions or not
is causing performance issues. It is slowing down our application when
we have to check the permissions on hundreds of folders. It also changes
the last access time stamp of the folder.

 

So is there any other way such as using Win32API or Win32 security
modules to check the permissions?

 

Please suggest.

 

Thanks

Ayaskant-

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110812/820922c4/attachment.html>


More information about the Python-list mailing list