[python-win32] Re: Problems with SetFileAttributes

Thomas Heller theller at python.net
Tue Mar 9 12:12:25 EST 2004


"Cioffi, Chris" <Chris.Cioffi at Anthem.com> writes:

> Hello all,
>
> I'm writing a little app where I need to create some directories that I
> would like to set the compressed flag on for Win2K.  However, neither
> win32file.SetFileAttributes nor win32api.SetFileAttributes seems to work.

Quote from MSDN for SetFileAttributes():

  The following table describes how to set the attributes that cannot be
  set using SetFileAttributes.

  FILE_ATTRIBUTE_COMPRESSED To set a file's compression state, use the
  DeviceIoControl function with the FSCTL_SET_COMPRESSION operation.

Using pywin32 doesn't save you to read MS docs.

Thomas




More information about the Python-win32 mailing list