compressing files using Windows command line

patd1
patd1 used Ask the Experts™
on
How can I use Windows compress command line tool to zip files in my program? I am using Windows 7 Os and did not find Resource kit tool for it. As far as I know Compress command line tool ships with Resource kit tools for Windows server 2003. Is there something else for Windows 7?

I do not want to use winzip command line utility.

Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2011

Commented:
Check the GZipStream class.  The link below also includes some sample code:

GZipStream Class (System.IO.Compression)
http://msdn.microsoft.com/en-us/library/system.io.compression.gzipstream.aspx

I hope this helps.

Author

Commented:
Check the GZipStream class.  The link below also includes some sample code:

GZipStream Class (System.IO.Compression)
http://msdn.microsoft.com/en-us/library/system.io.compression.gzipstream.aspx

If I use GZipStream in my code, and send the zip file to my client who uses windows OS, will they be able to unzip it by double clicking the file?

Thanks.
Top Expert 2011
Commented:
Probably not.  Here is another option:

ZipPackage Class (System.IO.Packaging)
http://msdn.microsoft.com/en-us/library/system.io.packaging.zippackage%28v=VS.100%29.aspx

Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

Jason YousefSr. BI  Developer

Commented:
It's called COMPACT


under
c:\windows\system32

this link for XP, but works the same
http://technet.microsoft.com/en-us/library/bb490884.aspx
Jason YousefSr. BI  Developer

Commented:
Just fyi, compact.exe doesn't create a zip file.

Author

Commented:
Not resolved yet!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial