471,325 Members | 1,442 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,325 software developers and data experts.

FTP Client Upload Code

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

Jan 13 '06 #1
3 6887
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<co***@coder.code> wrote in message
news:uJ*************@TK2MSFTNGP14.phx.gbl...
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

Jan 13 '06 #2
Hi,

<co***@coder.code> wrote in message
news:uJ*************@TK2MSFTNGP14.phx.gbl...
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

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Jan 13 '06 #3
I found a useful Ftp Client Code there

Thank you

http://www.gotdotnet.com/Community/U...C-61D8C81D0744
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>, haber
iletisinde şunları yazdı:uG**************@TK2MSFTNGP11.phx.gbl...
Hi,

<co***@coder.code> wrote in message
news:uJ*************@TK2MSFTNGP14.phx.gbl...
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

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Jan 13 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by WM Chung | last post: by
1 post views Thread by alfredfx | last post: by
5 posts views Thread by tolgademirel | last post: by
4 posts views Thread by Mr Gordonz | last post: by
6 posts views Thread by dinoo | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.