HomeWinBuzzer TipsHow to Use NTFS Compression for Drives, Files or Folders in Windows...

How to Use NTFS Compression for Drives, Files or Folders in Windows 10

We show you how to compress or uncompress files and folders in Windows 10 via File Explorer properties and the command line and how to enable or disable NTFS compression on your system.

-

file compression provides a quick way to free up space on your PC without having a drastic impact on your experience. When you compress or uncompress files in Windows 10, a lightweight NTFS compression is used. This lets you make your files smaller, but removed the need for manual decompression.

When should I use Windows 10 compression?

You can compress a folder (or complete drive) in Windows 10 when you're struggling for space and have files that you use infrequently or are of low impact. NTFS compression can degrade performance in some cases as your PC uses some resources to compress and uncompress files in the background.

As a result, programs, complex files, and videogame files aren't typically a good choice for compression. Instead, you should look to use Windows 10 compression on your family photo library, for example, or perhaps on smaller documents.

What is the difference to compressing files with ZIP, RAR and similar?

Windows 10 NTFS compression is a feature that works seamlessly and does not change a file´s format. Unlike in the case of a compressed ZIP file, NTFS compressed files (and folders) behave just like any other files and can be used without any further action by you and any software without the need to disable compression beforehand.

What is the difference to CompactOS compression in Windows 10?

CompactOS only compresses certain system files to free up space in Windows 10. It can act as an alternative to full NTSF compression on your system drive, only saving space where it impacts performance the least.

As a result, you don't stand to gain much from CompactOS use – between 2GB and 5GB of space – but that can be a lot if you're working with a 64 or even 32 GB drive. However, while CompactOS does its best to reduce Windows 10's size without impacting performance, it does have a minor negative impact.

Now that you're aware of all the details, we're going to walk you through how to compress a folder or files in Windows 10. We'll to so via two methods: File Explorer properties and the Windows compact command. If those methods to use are not available to you, you might need to activate Windows 10 NTFS compression before as we are showing you as well at the end of this page.

How to Compress Files, Folders or Drives in Windows 10 via Properties

makes file compression very intuitive via a dedicated toggle in the file properties menu. In fact, there's a good chance you've seen this toggle and played around with it before. Here's a quick reminder:

  1. Find the file, folder or drive you want to compress


    You can right-click the target of your Windows 10 compression or select multiple and right-click to do them all at once.

    Windows 10 - File Explorer - Folder

  2. Click ‘Properties'


    Windows 10 - File Explorer - Folder - Open Properties

  3. In the ‘General' tab, click ‘Advanced…'


    Windows 10 - File Explorer - Folder - Properties - Advanced

  4. Compress the file or folder with Windows 10's compression


    In the “Advanced Attributes” window, look for the “Compress or Encrypt attributes” menu. Tick “Compress contents to save disk space” and press “OK”.

    Windows 10 - Folder - Properties - Advanced - Check Compress Contents

  5. Press ‘OK' again

    This will exit you out of the folder or file properties menu.

    Windows 10 - Folder - Properties - General
  6. Confirm the Windows 10 file compression dialog


    A pop-up will appear with the heading “Confirm Attribute Changes”. Choose “Apply changes to this folder, subfolders and files”, or “this folder only” if you only want the loose files in the folder compressed.

    Compression may be instant or take some time depending on the size of your folder or file. Once complete, a Windows 10 compressed folder or file will be noted by two blue arrows in the top-right of its icon.

    Windows 10 - Folder - Properties - Advanced - Check Compress Contents - Apply Changes

How To Uncompress a File, Folder or Drive in Windows 10 via Properties

The process to uncompress files in Windows 10 is very similar to compressing them. A few tweaks in the properties menu is all that's needed. Uncompressed files should perform better and have faster transfer speeds than compressed ones.

  1. Select Windows' compressed folders


    The files will typically be noted by two blue arrows in the upper-right corner. Once you've selected the folder or files, right-click them.

    Windows 10 - File Explorer - Folder

  2. Click ‘Properties'


    Windows 10 - File Explorer - Folder - Context Menu - Properties

  3. Press ‘Advanced…'


    Windows 10 - Folder Properties - Advanced

  4. Uncompress a file or folder


    In the “Advanced Attributes” pop-up, you should be looking for the “Compress or Encrypt attributes” heading. Under it, untick the “Compress contents to save disk space” box and press “OK”.

    Windows 10 - Folder - Properties - Advanced - Disable Compress Contents to save Disk Space

  5. Press ‘OK' again to confirm the changes


    This will take you out of the properties menu and uncompress a file or folder. Once complete, refresh your File Explorer window. Your uncompressed files should no longer have the blue arrows in its icon.

    2.5 Windows 10 - Folder - Properties - Advanced

How to Compress Folders or Files in Command Prompt

Those who are familiar with the command-line or who are on a server install may find it easier to use the Windows compact command instead. This uses the exact same method as above – it just offers a different interface.

  1. Open command prompt

    Press the Start button and type “Command Prompt”. With Command Prompt selected, click “Run as administrator” in the right-hand panel.

    Windows 10 - Open Elevated Command Prompt

  2. Run the Windows compact command to compress files

    Find the full path of your file via file explorer or the command line and substitute it for the “file path” text below:

    compact /c “file path” /I /Q

    Type or paste this text into your command prompt. Being sure to keep the quotes around the file path. Press Enter to run the command.

    Windows 10 file compression will return the following message if it was successful:

    “x files within x directories were compressed.”

    Usefully, it will also give you an idea of how much space you saved. In our case, we managed to bring a 14.3 MB file down to 8.2 MB. Not bad going.

    Windows 10 - Elevated Command Prompt - Compact Command

How to Uncompress a File or Folder in Command Prompt

The method to uncompress files in command prompt is very similar – it just requires a slight change to the command. If you know the file path, this method is definitely faster than jumping through UI boxes.

  1. Open Command Prompt

    Press the Start button or search icon and type “Command Prompt”. With Command Prompt selected, click “Run as administrator”.

    Windows 10 - Open Elevated Command Prompt

  2. Run the uncompress files command

    We'll be using the Windows compact command again to decompress our files, but with one vital change. You must put /u in front of compact. Find your full file path and replace the “file path” text in the command below with it. Make sure you don't delete the quotes.

    compact /u “file path” /i /Q

    Once you've typed this into your command prompt, press Enter. If successful, you'll receive the response:

    “1 files within 1 directories were uncompressed”.

    You can now exit Command Prompt.

    Windows 10 - Elevated Command Prompt - Compact Command

If you found this tutorial useful, consider checking out our guides on using CompactOS compression and Windows 10 disk cleanup to free up some extra space.

How to Enable or Disable NTFS File Compression in Command Prompt

If you can´t compress folders or files with one of the previous methods, NTFS file compression might have been deactivated. You can use command prompt to enable or disable NTFS file compression in the following way.

If you get an error message, you will have to use one of the following two methods to enable/disable NTFS compression via group policy or regedit.

  1. Open CMD with admin-rights


    Windows 10 - open CMD

  2. Run the required command to activate or deactivate the NTFS compression feature

    To disable NTFS compression type this command: 

    fsutil behavior set disablecompression 1

    To enable NTFS compression type this command: 
    fsutil behavior set DisableCompression 0
     

    Windows 10 - CMD admin - fsutil behavior set DisableCompression

How to Enable or Disable NTFS File Compression in Group Policy

You can use group policy to enable or diable NTFS file compression only with Windows 10 Pro or higher. If you run Windows 10 Home, you will need to use the regedit method at the end.

  1. Open Gpedit via Windows 10 search

    Windows 10 - open gpedit

  2. Find the required policy setting using the left panel

    Navigate to Computer Configuration > Administrative Templates > System > Filesystem > NTFS.

    Open the policy Double-click Do not allow compression on all NTFS volumes via double-click.

    Windows 10 - gpedit - Computer Configuration Administrative Templates System Filesystem NTFS

  3. Select the required option

    To disable NTFS compression select Enabled.

    To enable NTFS compression select Disabled.

    To restore the default value select Not Configured (the compression will be enabled if it is not disabled by other methods).

    Windows 10 - GPedit - Do not allow compression on all NTFS volumes

How to Enable or Disable NTFS File Compression via Regedit

This method can be used to enable or disable NTFS file compression if the other two methods above are not available.

  1. Open the Registry Editor searching for “regedit”


    Windows 10 - open regedit

  2. Navigate to the following key
    Computer\HKLM\SYSTEM\CurrentControlSet\Control\FileSystem


  3. Create the required DWORD “NtfsDisableCompression” if missing 


    Right click into an empty spot on the right and select “New – DWORD 32-bit) Value”.

    Windows 10 Regedit - create DWORD

  4. Name the new DWORD “NtfsDisableCompression”


  5. Open “NtfsDisableCompression” via double click and select the preferred option


    Ttype into the Value data field 0 to enable NTFS compression or 1 to disable NTFS compression and save with OK.

Need to keep your files or folders private? Similar to the NTFS compression feature, Windows 10 can also natively encrypt a folder or file via its Encrypting File System

 
 
 
 
 
 
Ryan Maskell
Ryan Maskellhttps://ryanmaskell.co.uk
Ryan has had a passion for gaming and technology since early childhood. Fusing the skills from his Creative Writing and Publishing degree with profound technical knowledge, he enjoys covering news about Microsoft. As an avid writer, he is also working on his debut novel.
Table of Contents: