How to compress file from the command line? Today we are sharing here how to compress your file and you can use compress.exe utility. You need to download the tool as a part of Windows Server 2003 resource kit and it’s a download for the public.
How to Compress File from Command Line
Click here for Tool – http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en
Just need to install the above tool and you need to find out the compress.exe tool in the directory – “C:\Program Files\Windows Resource Kits\Tools”
How to Fix Sound Problem in Windows 10, 8.1, 7
Just use this tool and examples below:
To compress a file example.txt:
compress example.txt
compressedfile1.txt
Example:
C:\>”Program Files\Windows Resource Kits\Tools\compress.exe” sysinfo.txt sysinfo_compressed.txt Microsoft (R) File Compression Utility Version Copyright (C) Microsoft Corp. 1990-1999. All rights reserved. Compressing sysinfo.txt to sysinfo_compressed.txt. sysinfo.txt: 14211 bytes compressed to 3519 bytes, 76% savings. Total savings: 1 files, 14211 bytes compressed to 3519 bytes, 74% savings. C:\>
How to block a program in Windows 10 Firewall
You can also use the “compress.exe filename -R” to automatically rename your compressed files.
Neither the output file name is specified nor -R switch is added, get an error like below.
C:\>”c:\Program Files\Windows Resource Kits\Tools\compress.exe” manual.pdf
How to compress all files in a directory: (Just using regular expression *)
Example:
C:\>”c:\Program Files\Windows Resource Kits\Tools\compress.exe” * -R Microsoft (R) File Compression Utility Version Copyright (C) Microsoft Corp. 1990-1999. All rights reserved. Compressing August10.pdf to August10.pd_. August10.pdf: 6571 bytes compressed to 6510 bytes, 1% savings. Compressing July10.pdf to July10.pd_. July10.pdf: 6573 bytes compressed to 6525 bytes, 1% savings. Compressing June10.pdf to June10.pd_. June10.pdf: 6574 bytes compressed to 6520 bytes, 1% savings. Compressing May10.pdf to May10.pd_. May10.pdf: 6540 bytes compressed to 6476 bytes, 1% savings. Total savings: 4 files, 26258 bytes compressed to 26031 bytes, 0% savings. C:\>