7

I want to enable NTFS compression on a specific folder, in my case: C:\inetpub\logs.

This is easily done in Windows Server with Desktop Experience, but in Server Core how this can be achieved?

To be precise I just want the equivalent of checking the box "Compress contents to save disk space".

NTFS Folder Compression

Vinícius Ferrão
  • 5,400
  • 10
  • 52
  • 91
  • As an alternative, you could write a utility to zip up all the logs for a month and perhaps migrate them to yearly folders, and run it as a scheduled task. – Andrew Morton Aug 02 '19 at 16:35

1 Answers1

7

There is the compact utility that can change compression attribute from the command line. For example to set compression for the c:\docs directory and all files in it:

> compact /c /s:c:\docs *

A good description of the compact command is here: Compressing a File or Folder

You should be aware of the limitations of NTFS compression before deciding to use it. Please see Understanding NTFS Compression.

mebius99
  • 396
  • 1
  • 6