This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes FTP in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "FTP in Java" Watch "FTP in Java" New topic
Author

FTP in Java

Bhavesh Ravjee
Greenhorn

Joined: Jun 15, 2004
Posts: 11
Hi,

I am trying to FTP a file to a server. I am not quite sure how to do this.
I have been searching the net but nothing concrete has come up. I had a look at URL, which looks like what I need to do.

Can anyone guide me as to what I need to do. Also which do you think is better
1. ftp a file toa server using Java
2. execute a batch file from java that consists of ftp commands.

Please help...thanks!


With great power comes great responsibility!
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8291

You should have searched the Sockets and Internet Protocols forum. You'd get over 100 hits, including this helpful topic. Since this question really belongs in that forum, I'm going to lock it here. Feel free to follow up in the Sockets and Internet Protocols forum.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1865
Hi Bhavesh

look at http://www.maulinv.com/projects/projects.html - "Java based FTP".

That might help you...I wrote NetRCParser ..I have not tested it fully though.

Regards,
Maulin


1. Have fun @ http://faq.javaranch.com/java/JavaRaq
2. Looking for simple infix2postfix conversion and postfix evaluation package? Click here
Bhavesh Ravjee
Greenhorn

Joined: Jun 15, 2004
Posts: 11
Hi,

Has anyone used Runtime.getRuntime().exec(some command).
Certain commands do not work. So far its just the net send which does.

How can I get a batch file to be executed from this object. By the way
can ftp be executed using a batch file.

Thanks!
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8291

This question comes up a couple times a week.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: FTP in Java
 
Similar Threads
How do I FTP files form my html form using "input type=file" through jsp/servlet
How to ftp a file to a ftp server in java ??
Http
help regarding ftp server ?
How to achieve secured data transfer through FTPS/SFTP