在控制台中运行程序并使用Winzip压缩文件 [英] Running program in Console and Compressing files using Winzip

查看:129
本文介绍了在控制台中运行程序并使用Winzip压缩文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在控制台中运行我的模块.该流程的一部分是使用WinZip压缩文件夹.压缩通常需要3到7分钟,具体取决于要压缩的记录大小(文件夹内记录的数量).在这种情况下,控制台关闭,Winzip打开(处于最小化状态),使USer感到困惑,他可能认为该程序已经退出并会再次进行处理.

我想做的是压缩文件夹时,控制台仍然可见,并且会闪烁一条消息正在压缩文件,可能需要几分钟,请稍候..."
压缩完成后将关闭/退出/退出.

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?

推荐答案

首先,为什么要使用WinZip?这样,您将可以根据此应用程序来实现功能.

相反,如果您可以在代码中嵌入ZIP功能.

要使用ZIP,您可以使用#ziplib:
http://www.icsharpcode.net/opensource/sharpziplib/ [ http://en.wikipedia.org/wiki/7-Zip [ http://sevenzipsharp.codeplex.com/ [ ^ ].

这两个ZIP库都是开源的.

而且,即使您要使用WinZip并在控制台应用程序中使用它,也应该使用命令行WinZip.它将解决您的问题.请参阅:
http://www.winzip.com/downcl.htm [
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


这篇关于在控制台中运行程序并使用Winzip压缩文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆