This is a migrated thread and some comments may be shown as answers.

Download Multiple Files From FTP to Client System

3 Answers 222 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Suresh K
Top achievements
Rank 1
Suresh K asked on 27 Nov 2009, 11:42 AM

Hi.

can any one help me.

how to download multiple Files from FTP To Client System with a single Request.

I did code to Download Multiple Files From FTP.it's Downloading files and  storeing files in Server System not in Client System.

I can't able to Create Folder in Client System and Downloading Files .

And Also

I want to know how to create GZipStream file and how to add Multiple Files To Zip Folder

and Download That Zip File.I also tried this,but i am able to add only one file to Zip

Can Any one help me how to do this.Please........

Thank you

Suresh K

3 Answers, 1 is accepted

Sort by
0
Shaun Peet
Top achievements
Rank 2
answered on 27 Nov 2009, 07:02 PM
If you're looking for a way to create a zip of multiple files on the fly, download ICSharpCode.SharpZipLib:

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

Then it's as simple as this (in VB):

      Dim z As New ICSharpCode.SharpZipLib.Zip.FastZip  
      z.CreateZip(Response.OutputStream, _  
                  Server.MapPath("~/YourDirectoryName/"), _  
                  recurse:=True, _  
                  fileFilter:=Nothing, _  
                  directoryFilter:=Nothing)  
 

Two lines of code will zip everything in the selected directory (notice that the fileFilter and directoryFilter are set to nothing), and all sub-directories (recurse = true), and automatically send the file to the OutputStream.  Hope that helps,

Shaun.
0
Suresh K
Top achievements
Rank 1
answered on 30 Nov 2009, 07:05 AM
hi.
Thank you for your Reply.
You Did great job for me.
Thank you So much...

Suresh K
0
Suresh K
Top achievements
Rank 1
answered on 02 Dec 2009, 08:08 AM
hi.

when i download the Files i am getting Error Like This.

Cannot open file: it does not appear to be a valid archive.
If you downloaded this file, try downloading the file again.


can you tell me how to Solve This.

Thank You
Suresh K.
Tags
General Discussions
Asked by
Suresh K
Top achievements
Rank 1
Answers by
Shaun Peet
Top achievements
Rank 2
Suresh K
Top achievements
Rank 1
Share this question
or