Automatische Komprimierung aktivieren



  • Gibts einen Weg Dateien mit aktiviertem 'Inhalt komprimieren, um Speicherplatz zu sparen'-Flag zu erstellen bzw. das Flag im nachhinein zu setzten? Und von welchen Platformen wird diese Funktion eigentlich unterstützt?


  • Mod

    Wie wäre einfach mal mit MSDN lesen?

    Ein Datei Attribut setzen könnte heißen: SetFileAtributes, oder?
    Prima, man wird fündig bei:
    http://msdn.microsoft.com/en-us/library/aa365535(VS.85).aspx

    Dann liest man weiter und kommt zu folgendem Abschnitt:

    Remarks
    The following table describes how to set the attributes that cannot be set using SetFileAttributes. For a complete list of all file attribute values and their descriptions, see File Attributes.

    Attribute How to Set
    FILE_ATTRIBUTE_COMPRESSED

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



  • Ich habs versucht, wirklich. 😞
    Mir fehlte nur leider das Stichwort 'attributes'.

    Danke!


Anmelden zum Antworten