Windows – How to compress files with batch file

compressionwindows

I used COMPACT but it didn't compress the file except changing the file color from black to blue. I only used

COMPACT c:\fileToZip.bak /C

Did i make wrong?

Best Answer

Blue colour files indicate that the file has been compressed. Right click on the file, select properties and you'll see that the size consumed on disk has been reduced to the compressed size.

Example: Took a file of 9kb, compressed it. Now Windows Explorer still shows that the file is 9Kb but the properties show that size consumed on disk has gone down to the compressed size, indicating compression was successful.

alt text