Solved

compressing files using Windows command line

Posted on 2011-09-07
6
276 Views
Last Modified: 2012-09-19
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.
0
Comment
Question by:patd1
  • 2
  • 2
  • 2
6 Comments
 
LVL 23

Expert Comment

by:wdosanjos
ID: 36496069
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.
0
 

Author Comment

by:patd1
ID: 36496763
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.
0
 
LVL 23

Accepted Solution

by:
wdosanjos earned 500 total points
ID: 36496888
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

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 21

Expert Comment

by:Jason Yousef, MS
ID: 36575636
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
0
 
LVL 21

Expert Comment

by:Jason Yousef, MS
ID: 36575677
Just fyi, compact.exe doesn't create a zip file.
0
 

Author Comment

by:patd1
ID: 36989331
Not resolved yet!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question