10 C
Texas

Use the compact.exe command to reclaim space on Windows.

Hello! Operating systems such as Windows have as their main function to make computing very accessible to their users. Indeed, with them, we can do practically everything with our computers. As a result, typically a few clicks are enough for us. To this, we must add some more advanced things we can do with it. One of these elements is the compact.exe command. Indeed, this tool is ideal for those users who suffer from storage problems on their computers. This is a command available in both Windows 10 and Windows 11. It is also one of the best file compression solutions we can find. Thanks to a series of algorithms, we can compress all kinds of files to save a lot of space on our hard drives. Additionally, best of all, it does it without affecting the overall system performance. Next we will see the benefits of the compact.exe command.

This is how the compact.exe command works

The first thing we have to consider using compact.exe is that we will have to do it through the Windows Console. In other words, the classic command prompt. This element of the system tends to scare most users. Mostly because its interface and the syntax to be used are not exactly simple. However, it is enough to follow very concrete steps to make things as useful as this compact.exe. Besides, without fear of doing any damage to our computer.

To access this console, we will only have to write in the Windows search engine the word CMD. Alternatively, you can press Win+R and in the next window type CMD. Once opened, we will type the syntax needed to use this command. Consequently, we will separate the explanation into two parts to make it easier to use. First, a base with the word compact. On the other hand, with the use of the EXE parameter, which is the one we are truly interested in.

The first part we need to understand is the beginning of the syntax for compression. With this in mind, we will first use the word compact. Along with this, we have several options to use that will vary the compression process. In fact, we can use the /i command, which will make the process continue to the end, skipping all kinds of errors. There is also the /f command, which forces the compression of all the files that are in the path that we mark. Other essential commands are c/ and s/, as we will see below.

Testing it.

- Advertisement -

Let’s see a graphic example. Let’s suppose that we want to compress the os directory located in the root of the hard disk C. Consequently, the syntax that we must write in the console is like this:

compact /c  /s:c:\os

Below is the image:

The importance of the c/ command is because it is the one in charge of sending to compress. On the other hand, the /s command is used to send that compression to a certain directory. Once we understand how this command works, it is time to talk about the second part, which is really the interesting part.

How does the compact.exe compression mechanism work?

The /exe command is in charge of selecting the compression algorithm for our files. As we mentioned, this compression is really interesting because it does not affect the performance of our computer. In fact, decompression of these files takes place at the same time as their execution. There are 4 types of algorithms, ranging from the one that compresses the files the least (and therefore is faster) to the one that compresses the most. They are the following:

  • XPRESS4K
  • XPRESS8K
  • XPRESS16K
  • LZX

The default algorithm used by this command is the foremost. In fact, this is usually enough to save us a lot of space without affecting the performance of our computer. If you want to use another one, such as XPRESS8K, just enter the following syntax:

compact /c  /s:c:\os /exe:XPRESS8K

As we say, this type of file compression works great. However, sometimes it can affect the performance of very specific things such as video games. If you use it, and you are not satisfied, you can always go back and decompress the files as they were before. To achieve this, we only have to use the /u command. However, if we have used the EXE compression, we will also have to indicate the /exe parameter.

Other useful parameters of compact.exe:

  • /f forces compression or decompression. Already compressed or uncompressed files are skipped. It 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.

Conclusion

Large program and game folders, and folders with large uncompressed files, benefit the most from compression. Gigabytes of disk space can be reclaimed thanks to the command. In addition, most Windows users can use the CompactGUI program instead. Indeed, it is easier to use and handle. Very well, in this way we have seen how to use the compact.exe command to reclaim space on Windows. Bye!

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article