Meaningless Drivel is fun!*
The moose likes Sockets and Internet Protocols and the fly likes FTP in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
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: 8971
    
    9

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.


[How To Ask Questions On JavaRanch]
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
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
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: 8971
    
    9

This question comes up a couple times a week.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: FTP in Java