While new Computers come with hard drives that now have a boat load of disk space in the hundreds of Giga Bytes, many people out there may have older Computers where disk space is becoming short on available free space. One option is to upgrade your hard drive to get more disk space, but this process can be a hassle and comes with an expense if you are not tech savvy.
To help hold you off just a little bit longer, another option available in Windows, is to use the built in Compression utility which will compress folders and volumes that sometimes can end up returning a decent amount of free disk space.
Before you can compress any folders or drives in Windows, the drive must be formatted as NTFS. If you have drives that are not NTFS, you can convert FAT or FAT32 drives to NTFS by following the instructions in this Microsoft article (NOTE: using the convert command will not erase data on your drive).
To compress a folder or drive, open Windows Explorer and highlight the folder or drive,
Right click and select properties, then click on the Advanced button at the bottom.
NOTE: screen shots are from Windows Vista and will be similar in XP)
In the Advanced Attributes window, check the box next to Compress contents to save disk space and click OK twice.
At the Confirm Attribute Changes window, select which option you want to apply. I usually select the default - Apply changes to this folder, subfolders and files option. Click OK to start the compression.
The length of time to complete compression will depend on the amount of data in the folder or drive. When completed, you will notice the folder or drive will now appear in Windows Explorer as blue, which is an indication of compressed drives.
To view how much space has been saved, right click the folder or drive and select properties.
The Size on disk: parameter displays the compressed sized on disk, while the Size: parameter displays the non-compressed value. In the example above, approximately 4MB were reclaimed. While this is not a large amount of free space, compressing full drives will yield a greater return. If you do have very large folders, then compressing individual folders will be a benefit.
When using compression, if you move or copy a file into a compressed folder, it is compressed automatically. If you move a file from a different NTFS drive into a compressed folder, it is also compressed. If you move a file from the same NTFS drive into a compressed folder, the file retains its original state, either compressed or uncompressed.
Using compression will result in a small performance decrease when accessing the folder or drive. For general use, you will not notice the decrease, but do not use it with applications that require constant access to the drive (for home users you will not have this problem, the only exception is with running Anti-virus or Spyware scans).
If you want to un-compress, just return to the Advanced Attributes window of the folder or drive and uncheck the box next to Compress contents to save disk space.
For the command line Techies, you can compress folders or drives using the compact.exe command:
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.
When using compact.exe without parameters, compact will display the compression state of the current directory and files it contains. You will notice a "C" (with out quotes) next to folders that are compressed.