p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   C# (http://p2p.wrox.com/forumdisplay.php?f=22)
-   -   FTP Download (http://p2p.wrox.com/showthread.php?t=56449)

Anypond April 10th, 2007 12:59 AM

FTP Download
While i try to download a encrypted file(e.g : .pgp file) from FTP location the file is downloaded but the size of the file is changed and when i try to decrypt the downloaded encrypted file , it gives error. The FTP download works fine when we download a normal file

planoie April 10th, 2007 07:46 AM

What do you mean by "normal" file? What defines a file as "normal"?

Is it possible that you are downloading in ASCII mode instead of BINARY for this? So your "normal" file is simply a text file which downloads correctly in ASCII mode?


Anypond April 10th, 2007 11:16 PM

Hi Planoie,
I am using the below written code,
do let me know what changes i need to make

        stream = ftpResponse.GetResponseStream();
    reader = new StreamReader(stream, Encoding.UTF8);
    writer = new StreamWriter(destinationFile, false);
thanks in advance

planoie April 11th, 2007 08:54 AM

Not sure what to tell you. Your original post didn't say anything about you writting code that was doing this. I figured you were using an FTP client. I haven't worked with steams very much, so I'm not the right person to answer the question.


dbellavi June 14th, 2007 02:18 AM

Hi Anypond,

Could you please give me the code to download all the files in a directort from a FTP site.


All times are GMT -4. The time now is 02:08 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.