wood burning stoves 2.0*
The moose likes Java in General and the fly likes Ftp file to an AS400 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Ftp file to an AS400" Watch "Ftp file to an AS400" New topic
Author

Ftp file to an AS400

Dany Thomas
Greenhorn

Joined: Sep 19, 2003
Posts: 2
Hello ,
I was wondering if it is possible to strip a folder from an e-mail attachement and then send it to an AS400 server in Java.
Could anybody give a few hints .Bits of code if possible to lead me in the right direction.
I am relatively new to Java.
Thanks,
Dany
Chris De Vries
Ranch Hand

Joined: Dec 05, 2002
Posts: 65
You can use the javamail API to strip an attachment from an email message.
To FTP something that file to the AS400 server, you can try the following, although I have never tried to do this. Assuming that your AS400 server is called "server" your account is "user" and your password is "pass", and the filename you want to give the uploaded file is "somefile" then the following code should work:

[ October 01, 2003: Message edited by: Chris De Vries ]
[ October 01, 2003: Message edited by: Chris De Vries ]
[ October 01, 2003: Message edited by: Chris De Vries ]
[ October 01, 2003: Message edited by: Chris De Vries ]
[ October 02, 2003: Message edited by: Chris De Vries ]
Dany Thomas
Greenhorn

Joined: Sep 19, 2003
Posts: 2
Chris ,
Thanks for the information.
I am working on it.Will let you know if i need any further assistance.
It is the first time i used JavaRanch...and i am quite impressed.Shall be back for more...
Dany
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Ftp file to an AS400
 
Similar Threads
Creating an AS400-Object
transfer data from one DB to another
Locking a table for read
Web Services and AS400 RPG
Using Java Socket, ServerSocket with C/C++