FTP Client Upload Code

G

Guest

Hello,

I need to upload a file using ftp protocol, any sample csharp code avaliable
?

FTP Server is located on a mainframe and Complete Ftp Session should look
like this.

How could I write a routine for this process ?


//////////////////////////////////////////////////////////////////////////////////////////////////
ftp> open testserver.domain.com

Connected to testserver.domain.com

220-FTPD1 IBM FTP CS/390 V2R5 at testserver, 17:04:25 on 2002-01-31.

220 Connection will close if idle for more than 5 minutes.

User (testserver.domain.com:(none)): MYUSER

331 Send password please.

Password:MYPASSWORD

230 MYUSER is logged on. Working directory is "XXXXX.".

ftp> quote site lrecl=262 recfm=fb tr pri=999 sec=999

200-BLOCKSIZE must be a multiple of LRECL for RECFM FB 200-BLOCKSIZE being
set to 27772 200 Site command was accepted

ftp> put x 'ROPXOM.X.SQ000000.PSFTLCL$(+1)'

125 Storing data set ROPXOM.X.SQ000000.PSFTLCL$.G0005V00

250 Transfer completed (data was truncated)

ftp: 8591884 bytes sent in 40,67Seconds 211,27Kbytes/sec.

ftp>

//////////////////////////////////////////////////////////////////////////////////////////////////

Thank you
 
N

Nicholas Paldino [.NET/C# MVP]

If you are using .NET 2.0, then I would recommend using the
FtpWebRequest and FtpWebResponse class. I believe they support uploading
files.

If not, check out http://www.indyproject.org. I am sure they have an
implementation there somewhere.

Hope this helps.
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

Hello,

I need to upload a file using ftp protocol, any sample csharp code
avaliable

A lot of thirdt pary classes are around, they have been posted here several
times, look in the archives for links
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top