Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The following command compresses an entire NTFS drive:

compact e: /s /c /i

How do compress an entire drive, ignoring previously compressed files (in particular, .zip, .rar and .tib)?

Compressing a ".tib" file is pointless: its an Acronis TrueImage file, about 15GB, and as its already compressed it makes no savings to disk space, while wasting about 2 hours of time.

share|improve this question
up vote 2 down vote accepted

You will have to either compress all files and then later uncompress the ones you do not want compressed, or put the files you don't want compressed in separate directories and then do not select those directories when you are choosing files/folders to be compressed.

Windows does not provide a facility for marking a file to "not be compressed."

share|improve this answer
Yes - I'm wondering if there is a 3rd party utility, much like Microsoft's "compact" that can offer selective compression of files on an entire hard drive? – Contango Oct 29 '11 at 15:51

This sounds like something that may be scripted.

  • For each file in path, recursively traversing directories
    • If file name does not end up in .tib or .jpg or .avi or..
      • Then compress the file

You may try doing it in batch, or Powershell or Autohotkey. Recursively traversing directories looks hard but I found this and you can do FOR /R in batch

Now you'd need to write a script (batch or other) that does "if (not ending in .tib AND not ending in .rar etc.) then compress"

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .