Solved

compressing files using Windows command line

Posted on 2011-09-07
6
258 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
which object should i use (efficiency) 5 45
Tool Box 2 34
Syntax error 9 45
Connection String 16 43
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…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

911 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now