如何使用VB.Net 2008在Zip文件中添加多个文件 [英] How to Add mutiple files in Zip file using VB.Net 2008
本文介绍了如何使用VB.Net 2008在Zip文件中添加多个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在这个文件夹中有我的ExpData文件夹,我要放置导出的文件
xml文档.
路径= D:\ ExpData \ *.xml
像11180.xml/11180r.xml等文件名.
我想将此文件放在与vb.net(Windows应用程序)相同的文件夹中的zip文件中.
按下按钮事件
用户只需输入压缩文件名
并将所有* .xml文件压缩为zip文件
任何帮助将不胜感激.
在此先感谢.
I have my ExpData Folder in this folder i am placing my exported files
xml documents.
Path = D:\ExpData\*.xml
Filename Like 11180.xml / 11180r.xml etc.
I want to put this file in zip file in the same folder with vb.net (windows app.)
On Button Press event
User just input the zip file name
and all files *.xml compressed in zip file
Any help will be highly appreciated.
Thanks In Advance.
推荐答案
查看.NET的以下两个库:
开源DotNetZip库, http://dotnetzip.codeplex.com/ [ ^ ].
(我希望您理解在您的VB.NET项目中使用用C#编写的库不是问题,因为所引用程序集的.NET语言无关紧要…)
—SA
Look at these two libraries for .NET:
Open-Source DotNetZip library, http://dotnetzip.codeplex.com/[^].
A .NET Wrapper for the famous 7-zip is offered in this CodeProject article, "Best C# article of June 2008" prize winner: C# (.NET) Interface for 7-Zip Archive DLLs[^].
(I hope you understand that using libraries written in C# in you VB.NET project is not a problem, as .NET language of the referenced assembly does not matter…)
—SA
这篇关于如何使用VB.Net 2008在Zip文件中添加多个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文