File compression is a method for reducing the size of files, folders, and directories. This could greatly assist people with many large files on their Windows PC. You can use this feature for lossless compression of files, folders, and drives without decompression. This post will share how you can use the file compression feature in Windows. This applies to Windows 11, Windows 10, and all other versions of Windows.
How to Use File Compression Feature in Windows
Here is the list of topics we will discuss in the post to help you learn how to use the file compression feature in Windows.
- Compress a file or folder.
- Decompress a compressed file or folder
- File Compression Advanced Options
- Password-protect compressed files
While file compression doesn’t cause any data loss and has a good record, it is always a good idea to back up files if you do it for the first time.
1] How to Compress a File or Folder in Windows
- Right-click on the folder you want to compress and choose the Properties option from the context menu.
- Click on the General tab and click on the Advanced button.
- Click on the check box next to Compress contents to save disk space under Compress or Encrypt attributes.
- Click OK and then click on the Apply button.
- Another dialogue box will appear, and request your confirmation of your activity. By default, the option to compress the drive and all its data will be selected. Click OK to accept it.
Files, folders, and subfolders on the drive have all been compressed. Also, every folder and file that you drag and drop onto that hard drive will be compressed.
2] How to Decompress a Compressed File or Folder in Windows
Suppose you want to decompress any of these files soon. In that case, you can go again to Properties > General > Advanced and uncheck the Compress contents to save disk space under Compress or Encrypt attributes to decompress the compressed files.
3] File Compression Advanced Options
- Open File Explorer and locate the file or folder you want to exclude from being compressed.
- Right-click on the folder or file and click on Properties from the context menu.
- Click on the General tab and click on the Advanced button.
- Uncheck the box next to Compress contents to save disk space in the Advanced Attributes window.
- Use Windows’s compact command line program to exclude multiple files or folders. You can open Command Prompt to exclude specific files and folders.
- Open the Command prompt or Windows Terminal.
- Copy and paste or type the following command line and press the Enter key to exclude a specific file:
compact /EXE /U "file_name"
Replace the “file_name” with the file name you want to exclude.
- Copy and paste or type the following command line and press the Enter key to exclude a specific folder:
compact /EXE /U /S: "folder_path"
Replace the “folder_name” with the folder name you want to exclude.
- Once you have excluded the files or folders, they will not be compressed when you compress the rest in the exact location.
4] How to Encrypt Files or Folders?
Although Windows does not support password protection for compressed files or folders, you can still take precautions to keep your data secure.
Note: You can either encrypt or compress using Windows Method.
By encrypting the data in your folder or zip file, the Encrypting File System (EFS) creates a decryption key that serves as a password. Those with the exact right key can only unlock the contents. Follow the steps given below to encrypt a compressed file.
- Right-click on the compressed file you want to encrypt and select Properties from the context menu.
- Click on the Advanced button.
- Click on the checkbox next to Encrypt contents to secure data and click OK.
5] How to Password-Protect Compressed Files?
If you need to password-protect a compressed file, use a third-party tool that runs on Windows, e.g., WinRAR. You can also search the internet for programs that offer password protection for zipped files.
Here, let us see how to password-protect a compressed file or folder using WinRAR. By using WinRAR’s password-adding feature, you can make password-protected archives and prevent anyone without a password from accessing them.
Only users with the correct password can access the files and folders inside the password-protected archive you create. Here is a step-by-step guide on how to use WinRAR to build a password-protected archive. Make sure that WinRAR is installed on your PC.
- Right-click on the file or folder you want to include in the archive.
- Click on the Add to archive option from the context menu.
- Details should be provided, like the Archive name, Archive Format, etc. Then, to set a password for your archive, click Set Password.
- Enter the password you want to use to safeguard the archive in the Enter Password section, then enter it again for confirmation and click OK.
Once you click OK, you will find a password-protected WinRAR file on your PC, and the next time you or anyone tries to access it, it will ask for a password. So, make sure you remember the password so that you will not lose access. So, the process of creating a password-protected WinRAR archive is complete!
Conclusion
So, this is how you compress files using the compression feature in Windows. So why compress a file on your PC? A compressed file transfers faster and uses less network bandwidth. It also increases storage space on your device plus lowers costs, and boosts output.
You do not need to use any third-party tool to compress files and folders on your PC. You can save time and effort by following the instructions in this article to compress your files and folders via the built-in file compression feature in Windows for efficient file management.
Have more questions about the file compression feature on Windows? Check out the frequently asked questions and their answers below to know more!
What Are the Different Types of File Compression Algorithms Supported by Windows?
There are two types of file algorithms supported by Windows, namely lossless and lossy.
Lossless compression technologies shrink file sizes without erasing any of their contents, allowing us to recreate the original data from the compressed version.
While lossy compression techniques can dramatically reduce file size without sacrificing file quality, they do so by discarding the less crucial information in a file.
What Are the Advantages and Disadvantages of Using File Compression?
Compression’s main advantages include decreased communication bandwidth, data transmission time, and storage hardware. This may save you a lot of money on expenses. When compared to uncompressed data, compressed files use substantially less storage space, which results in a significant reduction in storage costs.
Decompressing compressed files uses additional memory. Thus, your PC needs more memory to finish the operation. If the RAM is low, it can pause or face an error.