Solved

compressing files using Windows command line

Posted on 2011-09-07
6
257 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 21

Expert Comment

by:huslayer
Comment Utility
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:huslayer
Comment Utility
Just fyi, compact.exe doesn't create a zip file.
0
 

Author Comment

by:patd1
Comment Utility
Not resolved yet!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

763 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

16 Experts available now in Live!

Get 1:1 Help Now