Solved

compressing files using Windows command line

Posted on 2011-09-07
6
269 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

829 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