How to compress a drive, folder or file to save space in Windows

The Windows operating system has a feature that allows you to compress a disk to save hard disk space. In some situations, you need to compress disk space, due to the lack of free space there, which is necessary to accommodate other files.

On computers with the NTFS file system, there is a function for compressing files and directories (directories, folders, disks, volumes) built into the Windows operating system. This will give you more free space on your hard drive.

Let’s see what it means to compress a disk, what will happen if you compress drive “C”? In this situation, not everything is as obvious as it seems at first glance.

Shrink disk to save space: what is it?

What does it mean to shrink a drive to save space? When compressed, the size of the occupied space on the disk decreases, and there is more free space. The action of the operating system tool resembles the work of an archiver.

Windows overwrites the data, as a result, it takes up less space on the local disk. Everything seems to be fine, but this has its own nuances:

  • compressed files will get into RAM faster, therefore, performance will increase;
  • opening compressed files will require more processor resources, and this slows down the computer.

It should be noted that if you compress the system partition, then with frequent compression, the fragmentation of compressed files will increase, therefore reading and writing files will slow down, and this affects the performance of the system.

The process of shrinking a disk takes some time, depending on the amount of space that files occupy on this volume. Shrinking a disk is a reversible operation. The user can uncompress the volume if it is no longer needed.

Considering all of the above, we come to the following conclusions:

  • Compression works on the NTFS file system.
  • Compression will free up some free disk space.
  • Previously compressed files are not recompressed.
  • It is highly likely that after shrinking the disk, the PC will become slower.
  • On some computers, after shrinking the system drive, problems may occur when updating the system or when using drivers.

Whether to compress a disk to save space is up to the user to decide, given different circumstances. The user can not only compress a disk partition, but also compress an individual folder or file without compressing the entire disk. In this case, the performance of the system will not suffer.

Is it possible to compress drive “C”? Yes, but this should only be done in certain situations. For example, if there is not enough space to install the required update, or to get some important files from the Internet to your computer.

After obtaining the desired data, perform a disk cleanup, and then disable volume compression in Windows.

The Windows 10 operating system independently compresses some system files during its operation if necessary, in addition, the Compact OS function has been added to the system to compress system files.

In this guide, you will find several instructions on how to compress a hard drive in several ways, or how to uncompress a drive, folder, or file.

How to shrink the “C” drive on Windows from Explorer

Now I’ll show you how to shrink the “C” drive in Windows Explorer. Suppose that for some reason we needed to compress the system disk on the computer.

Do the following:

  1. Open an Explorer window.
  2. Right click on the drive you want to shrink to save space.
  3. Select “Properties” from the context menu.
  4. In the Local Disk (C:) Properties window, on the General tab, check the box next to Compress this drive to save space.
  5. Click on the “OK” button.
  6. In the “Confirm attribute changes” window, review the information, and then click the “OK” button.

There are two options for compression:

  • Apply changes only to the C: drive.
  • To drive C: and to all subfolders and files.

By default, the option to apply changes to the drive and all subfolders and files is enabled.

  1. The “Access Denied” window requires administrator rights to change attributes. Click on the “Continue” button.
  2. There is a process of processing and application of attributes.

As a result of applying compression, more free space appeared on the disk.

The process of compressing any other local disk is carried out in a similar way.

How to compress a file or folder on the command line

Using the system tool: command line, the user can compress a folder or file on a computer disk.

Run command prompt as administrator.

To compress a folder with all its contents, run the command in the command line interpreter window:

compact /c /s:"full path to folder" /i /Q

To compress a file, run the command:

compact /c "full path to the file" /i /Q

How to compress a folder or file in Windows

In the Windows operating system, the process of compressing a folder or file proceeds in a similar way, similar to compressing a disk.

Do the following:

  1. Right-click on a folder or file.
  2. In the “Properties: X” window, click on the “Others …” button.
  3. In the “Additional Attributes” window, in the “Compression and Encryption Attributes” parameter, check the “Compress contents to save disk space” checkbox.
  4. Click on the “OK” button.
  5. After that, the individual file will be compressed. When compressing a folder, an additional window will open.
  6. In the “Confirm attribute changes” window, click the “OK” button.

Here you need to choose the appropriate option:

  • Apply changes to this folder only.
  • To this folder and to all subfolders and files (this is the default setting).

After that, the process of compressing the folder will start.

In the Explorer window, the compressed folders and files will display signs warning that the items have been compressed.

Uncompress a drive from Explorer

To cancel compression, you will need to reverse the operation. All actions are almost identical to those that were performed during the compression process.

  1. Launch Windows Explorer.
  2. Right click on the computer disk.
  3. In the menu that opens, click on “Properties”.
  4. In the properties window of the disk, in the “General” tab, uncheck the box next to “Compress this disk to save space”, and then click on the “OK” button.
  5. In the “Confirm attribute changes” window, click the “OK” button.
  6. In the “Access Denied” window, click the “Continue” button.
  7. Wait for the operation to complete.

Disable Drive Compression from the Local Group Policy Editor

In Windows Pro (Professional) Windows Enterprise (Corporate) operating systems, users can use the system tool: the local group policy editor, to disable compression of all drives.

  1. Press the “Win” + “R” keys on your keyboard.
  2. In the “Run” window, enter the command: “gpedit.msc”, click on the “OK” button.
  3. In the “Local Group Policy Editor” window, follow the path:
Computer Configuration => Administrative Templates => System => File System => NTFS
  1. In the “NTFS” policy setting, click on the “Disable compression on all NTFS volumes” option.
  2. In the “Disable compression on all NTFS volumes” window, activate the “Enabled” option, and then click on the “OK” button.
  3. Restart your computer.

To reverse the operation: cancel the prohibition of compression, enter the group policy settings, in the “Disable compression on all NTFS volumes” window, select the “Not configured” option.

How to uncompress a file or folder

The user has the ability to cancel the compression of a folder or file at any time. To do this, follow these steps:

  1. Right click on the file or folder.
  2. Click on “Properties” in the context menu.
  3. In the properties window, in the “General …” tab, click on the “Other …” button.
  4. In the “Additional Attributes” window, uncheck the box “Compress content to save disk space”, and then click on the “OK” button.
  5. Next, click on the “OK” button in the properties window of the folder or file.
  6. For folder options, select the appropriate attribute to unpack.

Uncompress a folder or file on the command line

Using the command line, you can perform the reverse operation: disable compression of a folder or file.

Run command prompt as administrator.

To uncompress a folder, run the following command:

compact /u /s:"full path to folder" /i /Q

Run this command to uncompress a single file:

compact /u "full path to file" /i /Q

Article Conclusions

If the user is faced with the need to compress the disk to save space, he can compress the disk, compress an individual folder or file, using the tools of the Windows operating system. These methods can free up some disk space on your computer.

Leave a Reply

Your email address will not be published. Required fields are marked *