Tapojjwal Mandal

Can any body tell me that How I can make a single ZIP file of Mutiple Files.

The approach is :

I have 5 files...How I will make a single ZIP file after compressing

Thanks for help.




Re: Visual Basic Express Edition How to make a Zip file of Multiple Files

tir na nog 2

put all files in a folder and zip the folder





Re: Visual Basic Express Edition How to make a Zip file of Multiple Files

Omar Abid

There's a sample about how to make and compress files.

Download it from MSDN (101 VB sample)






Re: Visual Basic Express Edition How to make a Zip file of Multiple Files

Tapojjwal Mandal

Yea....You are right for static ZIP...but I want to do it Dynamically....The Program Itself will do it at the time of Upload the files in FTP server...so that is why I am asking.




Re: Visual Basic Express Edition How to make a Zip file of Multiple Files

Tapojjwal Mandal

I have already seen that examples...Originally it is not Zipping the original content....and also it can able to Zip a single file. I want to develop it for the multiple files.






Re: Visual Basic Express Edition How to make a Zip file of Multiple Files

Omar Abid

You need to use HEX !

Zip each file and then take the Hex value of each file in one






Re: Visual Basic Express Edition How to make a Zip file of Multiple Files

JohnWein

Use the Shell32.dll Folder.CopyHere method to compress the files into a "Compressed (Zipped) Folder".




Re: Visual Basic Express Edition How to make a Zip file of Multiple Files

Tapojjwal Mandal

But I dont have any Idea of that....Any other way






Re: Visual Basic Express Edition How to make a Zip file of Multiple Files

JohnWein

Use a third party compression library or contract the task to a consultant.





Re: Visual Basic Express Edition How to make a Zip file of Multiple Files

Tall Dude

See 3rd party software at

http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx

it is GPL license, which I think means in layman's terms

it is free and you can use it.

Even though it says C# in the name;

the code I downloaded was VB Express compatable.






Re: Visual Basic Express Edition How to make a Zip file of Multiple Files

JohnWein

Isn't the Shell32 CopyHere Method simpler



Re: Visual Basic Express Edition How to make a Zip file of Multiple Files

Tapojjwal Mandal

EACompression.DLL is really helpfull but it is nto free..I need any free Dll which Has the ability to add more than one file into the zip file. Can any body tell me about this type of dll...

I mean that:

For EACompression the method is:

Code Snippet

Try

Dim oZip As New ZipArchive("TryIt")

'ZipArchive("TryIt")

oZip.Create("c:\test.zip", True)

'create a new zip file

Dim password As String = "information"

Dim files() As String

Dim File As String

files = Directory.GetFiles("C:\WSG", "*")

For Each File In files

oZip.AddFile(File, "", password)

Next

'add all files and sub-directory in temp folder to zip archive

'oZip.AddDirectory("c:\temp", password)

Catch ep As Exception

Console.Write(ep.Message)

End Try

By this we can ZIP a file...See oZip.AddFile is Using for the addition of multiple files in a single Zip file. I have already used the ICSharp for compressing....But in that there is no such Methods.

Thanks for the help






Re: Visual Basic Express Edition How to make a Zip file of Multiple Files

Tapojjwal Mandal

Can any body give me the name and download link for a free dll which is able to compress Multipla files in a single Zip file ............Thanks for help....




Re: Visual Basic Express Edition How to make a Zip file of Multiple Files

JohnWein

The dll is called Shell32.dll. You can download it from your Windows\System32 directory.





Re: Visual Basic Express Edition How to make a Zip file of Multiple Files

Tapojjwal Mandal

Hi JohnWein ,

What are the methods for using that Shell32.dll file into my programs for Compressing Can you tell me elaborately with giving some code hints....It is Urgent...Thanks for help.