Click here to Skip to main content
15,889,867 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'm running my module in Console. Part of the flow is compressing a Folder using WinZip. The compressing usually takes 3 to 7 minutes depending on the size of records(volume of records inside the folder) to compressed. In this Instance, the Console closes and Winzip opens (in minimized state) confusing the USer that might think that the program had exited and would again re process.

What I want to do is when compressing the folder, the Console will still be visible and will flash a message "Compressing Files, might take minutes, Please wait..."
and will close/exit/quit when the compression is done.

Please teach me how to do It?
Posted

1 solution

First of all, why using WinZip? This way, you would make your functionality depending on this application.

Instead, if you can embed ZIP functionality in your code.

For working with ZIP, you can use #ziplib:
http://www.icsharpcode.net/opensource/sharpziplib/[^].

Another option is using SevenZipSharp, a .NET wrapper of the famous 7-Zip:
http://en.wikipedia.org/wiki/7-Zip[^],
http://sevenzipsharp.codeplex.com/[^].

Both ZIP libraries are open-source.

And even if you want with WinZip and use it in a console application, you should rather use command-line WinZip. It will solve your problem. Please see:
http://www.winzip.com/downcl.htm[^].

—SA
 
Share this answer
 
Comments
Alan Tuscano 16-Apr-12 2:05am    
Hi SA,

I'm using winzip...

What i want to know is how to make my console visible when Winzip compresses the files i've extracted from other folder.
Sergey Alexandrovich Kryukov 17-Apr-12 11:15am    
If you use console-mode WinZip, it will use the same console, the one of the application started the child process of WinZip. This is the solution.
But I explained why using WinZip is not the best thing. It might not be installed on the user's computer, its path may not be known to your program, etc.
--SA
Alan Tuscano 25-Apr-12 0:00am    
Endeed SA,

I've prefer using SharpZipLib, its just that my PM persists using winzip. Though I have create a fucntion using sharpziplib, I wanted to create another using Winzip. I'll just assign a flag in my config, so that i can select what function to call if winzip does not exist in the user's pc.

VJ Reddy 17-Apr-12 8:00am    
Good advice. 5!
Sergey Alexandrovich Kryukov 17-Apr-12 11:15am    
Thank you, VJ.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900