Logo: TechTrax...brought to you by MouseTrax Computing Solutions

Decompressing NTFS File Systems

by Greg Chapman, MVP (retired)

Skill rating level 5.

Sad news folks: If you’ve ever succumbed to the temptation to compress your NTFS partitions, there are a few surprises you may have received after you later changed your mind. One of them is that clearing the Compress drive to save disk space checkbox doesn’t uncompress the drive! But don’t worry, there’s an easy fix and this will be a short article as a result. The details are directed toward Windows XP systems, but Windows 2000 systems will work in a similar way.

After you’ve discovered that you didn’t save much space and that file access became a little slower, getting control of the compressed files is actually pretty easy. Just open a command prompt (click Start > Run and type cmd and hit enter) and do the following:

  1. Change to the root of the drive. For instance, if you’re wanting to decompress C:\, type “cd c:\” (without the quotes) and press Enter.

  2. Now at the c:\ prompt, type the following and press Enter.

         compact /u /s /i

  3. Wait until the job has finished.

You can easily verify whether files are compressed or not by opening Windows Explorer (Windows key + E) and choosing the Tools menu followed by clicking Folder Options. Amongst the settings on the View tab, you should find and check the entry for Show encrypted or compressed NTFS files in color.

Click Apply and then click the Apply to All Folders button. Acknowledge the warning message telling you that these settings won’t take effect until the next time you open Windows Explorer.

Once you have these view settings in place and have run the COMPACT command (below), your files should be uncompressed and system performance should return to normal.

For reference, here are the available command switches for the COMPACT command:

COMPACT: Displays or alters the compression of files on NTFS partitions.

COMPACT [/C | /U] [/S[:dir]] [/A] [/I] [/F] [/Q] [filename [...]]

/C Compresses the specified files. Directories will be marked so that files added afterward will be compressed.

/U Uncompresses the specified files. Directories will be marked so that files added afterward will not be compressed.

/S Performs the specified operation on files in the given directory and all subdirectories. Default "dir" is the current directory.

/A Displays files with the hidden or system attributes. These files are omitted by default.

/I Continues performing the specified operation even after errors have occurred. By default, COMPACT stops when an error is encountered.

/F Forces the compress operation on all specified files, even those which are already compressed. Already-compressed files are skipped by default.

/Q Reports only the most essential information.

filename Specifies a pattern, file, or directory.

Used without parameters, COMPACT displays the compression state of the current directory and any files it contains.You may use multiple filenames and wildcards. You must put spaces between multiple parameters.

Click to rate this article.

Go up to the top of this page.
This site powered by the Logical Web Publisher™: Content management by Logical Expressions, Inc.