When your hard drive is out of space, but you don't want to delete some files and folders, as it's may be important, your best choice is to compress files to free up space. This post will show you how to compress or decompress files and folders on a Windows PC.
When your hard drive is out of space, but you don't want to delete certain files and folders, as it may be important, your best bet is to compress the file to free up space. This article will show you how to compress or unzip files and folders on a Windows PC.
Windows File Compression is a part of the NTFS file system, it'll automatically compress files to take up less space on the disk when enabling this feature, you can compress an individual file and an entire folder.
Step 1: In Windows/File Explorer, right-click the folder and click Properties.
Step 2: In the General tab, click on the Advanced button.
Step 3: To check on Compress contents to save disk space box, and click on OK.
Tips: Decompressing compressed files and folders with Windows File Compression
To decompress this folder uncheck Compress contents to save disk space box.
Step 4: Click Apply button, then select to Apply changes to this folder only or Apply changes to this folder, subfolders, and files, and click on OK.
You can select to compress or decompress files and folders via command. And you need to know the full path of that file and folder see 2 ways to get the full path of files and folders.
Step 1: Press Win + X keys to open a Command Prompt.
Step 2: Execute the following commands to compress or decompress, and press Enter key.
Compress a file or only a folder Command:
Such as I want to decompress a text file in desktop, execute the command like this: compact /c "C:\Users\emily\Desktop\file.txt" /I /Q
Decompress a file or only a folder:
Compress a folder and its content: compact /c/s "full path of file" /I /Q
e.g. To compress New Folder and its contents: compact /c/s "C:\Users\emily\Desktop\New Folder" /I /Q
Decompress a folder and its content: compact /u /s: "full path of folder" /i /Q
e.g. To uncompress a folder named usb, execute command: compact /u "C:\Users\emily\Desktop\usb" /i /Q
Step 3: When you have done, close Command Prompt Window.
The meaning of letters in command, you may want to know:
/c Compresses the specified files. Directories will be marked so that files added afterward will be compressed.
/u Decompresses the specified files.
/s Perform the specified operation on files in the given directory and all subdirectories.
/a Display files with the hidden or system attributes.
/I Continues performing the specified operation even after errors have occurred.
/Q Reports only the most essential information.