Windows 10: How to use compact.exe to free up disk space on Windows

Discus and support How to use compact.exe to free up disk space on Windows in Windows 10 News to solve the problem; Microsoft introduced new options for the command line tool compact.exe in the Windows 10 operating system. It allows users to compress folders on the... Discussion in 'Windows 10 News' started by GHacks, May 14, 2022.

  1. GHacks
    GHacks New Member

    How to use compact.exe to free up disk space on Windows


    Microsoft introduced new options for the command line tool compact.exe in the Windows 10 operating system. It allows users to compress folders on the system using new algorithms to free up disk space.

    Unlike many other compression solutions, compact promises to have little impact on performance when the files need to be loaded by the system. Files are compressed without changing the file extension or location. Decompression happens during runtime, and most modern systems should not break a sweat doing so. The tool is included in Windows 11 as well.

    Compact.exe compresses files and folders on Windows without changing filenames or making other modifications to the files. Depending on the type of files, compression may save Gigabytes of disk space or very little. Files that are compressed already, e.g., JPG image files, will show little gains when compress is run on them. Uncompressed files on the other hand may show large gains. You can check out this GitHub page, which lists hundreds of games and programs, and the savings when using compress.exe on them.

    A few applications and games may react badly to compression. If that is the case, uncompressing will resolve the issue.

    Tip: if you prefer a graphical user interface, check out CompactGUI. Windows includes an option to compress the entire drive. Right-click on any drive in explorer and select Properties to open the option. You find "Compress this drive to save disk space" under General in the properties window.

    Using compact.exe on Windows


    How to use compact.exe to free up disk space on Windows compact-output.png

    You may run the program from any command prompt window. Open a new command prompt window, e.g., by using Windows-R to open the run box, typing cmd.exe and hitting the Enter-key on the keyboard.

    Running compact on its own displays the compression status of all folders and files of the current directory.

    The command line tool support several parameters, some of which may be confusing at first.

    The core commands compact.exe /c and compact.exe /u mark the current or specified directories so that future changes to the folder, e.g., modified files or newly added files, are compressed or uncompressed.

    It is necessary to supply the /s parameter to the command to perform the selected operation on all files in the specified directory and all of its subdirectories.

    By default, the current directory is used, but a directory may be supplied to perform the operation on a different directory instead. To do that, add path information to the command.

    The command compact.exe /c /s:c:\users\test\downloads\ runs the compression on the downloads directory.

    You may specify the compression algorithm by supplying the /EXE parameter. The parameter /EXE:XPRESS8K uses that algorithm. The following algorithms are supported:

    • XPRESS4K (fastest and default value)
    • XPRESS8K
    • XPRESS16K
    • LZX (most compact)

    The default algorithm is designed to make the performance impact as minimal as possible, even on older systems. Most devices should not have issues using the 8k or even 16k algorithm instead.

    Other useful parameters of compact.exe:

    • /f forces the compression or uncompression. Already compressed or uncompressed files are skipped. Should be used if the process was interrupted, e.g., by a crash.
    • /i ignores errors and continues the operation without stopping.
    • /? displays help information.
    Closing Words


    Large program and game folders, and folders with large uncompressed files, benefit the most from the compression. Gigabytes of disk space may be recovered with the help of the command. Most Windows users may use the CompactGUI program instead, as it is easier to use and handle.

    Now You: have you used compact.exe in the past?

    Thank you for being a Ghacks reader. The post How to use compact.exe to free up disk space on Windows appeared first on gHacks Technology News.

    read more...
     
    GHacks, May 14, 2022
    #1

  2. Low Disk Space error

    Hi,

    I suggest you to delete the unwanted applications or games installed on the device and also perform a Disk Cleanup.

    In order to delete the games or applications, which has been downloaded from the Windows Store you need to right click on the game and select
    Uninstall option from the Start menu.

    If the games that you are downloaded are .exe or the applications which are not downloaded from the Windows Store, you may try deleting it from the Control panel.

    To do so, please follow the below steps.

    • Right Click on Start Menu.
    • Open Control Panel.
    • Click Programs.
    • Click Programs and Features.
    • Click on the programs that you would like to uninstall.
    I suggest you to try the steps in the following article to free up space and check if it helps.

    http://windows.microsoft.com/en-in/windows-10/free-up-drive-space

    Also, refer to the Wiki Article created by
    Andre Da Costa
    from the below link:

    How to free up disk space in Windows

    http://answers.microsoft.com/en-us/...-windows/2458cc31-bd19-482f-ace5-7e3bd9da8098

    Hope it helps. Revert to us with the results, will be glad to assist you.

    Thank you.
     
    Mohan Babu ER, May 14, 2022
    #2
  3. Kari Win User
    Compacting virtual hard disks

    Please do not take this wrong, I just have to say that your process involves awfully lot unnecessary work!

    To start with, a dynamically expanding VHD can only grow. It never shrinks, that's not what Compact Disk means. Each checkpoint, even when later removed makes VHD bigger, and so on.

    My workflow when I want to free unnecessary space used by my dynamical VHDs:

    • Disk clean-up
    • Create Macrium image of my VM
    • Shut down VM
    • Replace existing VHD with new dynamically expanding one in VM settings
    • Restore Macrium image to new VHD
    Can't understand why you mount VHD in host, can't understand why to save old VHD as .bak when Macrium Image exists.

    Of course I also export all new Hyper-V virtual machines as soon as I have finished installing Windows, when the VHD file size is smallest. If then later I want to start from scratch, from freshly installed Windows, I just delete the VM and import it back.
     
  4. How to use compact.exe to free up disk space on Windows

    How to release unused space in VHDX disks?


    Everything except for the outdated Sdelete step. That is everywhere on the net but is not necessary now if it was before. It would take more than 24 hours on my setup to complete sdelete. Using the hypervisor administrator in 2016 server, I skipped the sdelete step, or zeroing free space. I just ran disk compact after deleting 150gb without zeroing anything and the size on disk was compacted by Hypervisor administrator to the 38GB's stored on disk and the virtual disk size unchanged.
     
    sticker592, May 14, 2022
    #4
Thema:

How to use compact.exe to free up disk space on Windows

Loading...
  1. How to use compact.exe to free up disk space on Windows - Similar Threads - compact exe free

  2. Free up disk space prompt

    in Windows 10 Gaming
    Free up disk space prompt: Hello I have got a doubt regarding this free up space prompt saying we can't update your device because of low disk space. I want to know that if I go through this prompt and select downloads folder and delete a file by pressing right click delete will the file go to recycle...
  3. Free up disk space prompt

    in Windows 10 Software and Apps
    Free up disk space prompt: Hello I have got a doubt regarding this free up space prompt saying we can't update your device because of low disk space. I want to know that if I go through this prompt and select downloads folder and delete a file by pressing right click delete will the file go to recycle...
  4. Free up disk space prompt

    in Windows 10 Drivers and Hardware
    Free up disk space prompt: Hello I have got a doubt regarding this free up space prompt saying we can't update your device because of low disk space. I want to know that if I go through this prompt and select downloads folder and delete a file by pressing right click delete will the file go to recycle...
  5. How to use Storage Sense in Windows 11 to free up disk space

    in Windows 10 News
    How to use Storage Sense in Windows 11 to free up disk space: [ATTACH]Storage Sense in Windows 11 is a great way to manage your computer’s storage. When configured, it can automatically empty the Recycle Bin, delete temporary files, and do other things to organize your storage. In this post, we show you how to turn on, configure and use...
  6. How to free up space

    in Windows 10 Software and Apps
    How to free up space: [ATTACH] How cand I free up space ???? https://answers.microsoft.com/en-us/windows/forum/all/how-to-free-up-space/554033b0-4ef8-4c92-b2ee-001836820422
  7. How to free up space

    in Windows 10 Software and Apps
    How to free up space: [ATTACH] How can I clean does 1.12gb on my storage ? https://answers.microsoft.com/en-us/windows/forum/all/how-to-free-up-space/52aae979-7bc7-4953-b91d-0a4cf8925849
  8. Disk space isn’t freeing up

    in Windows 10 Drivers and Hardware
    Disk space isn’t freeing up: Ive had low disc space for two years now but i never got around to fixing it for some reason.I have been trying nonstop to free up disk space ive used disk cleanup ive tried to merge the disks but nothing works please please help i would appreciate it...
  9. Freeing up Disk Space??

    in Windows 10 Software and Apps
    Freeing up Disk Space??: My computer is almost new with almost no programs added. I've also gone through and deleted some unwanted programs. Yet it won't let me add anything new because it says I don't have enough disk space. My sister thinks I may have a virus but I can't even install anti-virus...
  10. disk storage: freeing up space

    in Windows 10 Network and Sharing
    disk storage: freeing up space: Microsoft: In the change how free up space automatically, I had 3.08 GB of space freed up. But it dropped down to 3.06 GB. I managed to free up space and it went up to 3.07 but now, it dropped down to 2.73 GB. What happened there? Is it a bug or is that normal or what is...