Ftp

Reply

Join Date: Jun 2004
Posts: 609
Reputation: freesoft_2000 is an unknown quantity at this point 
Solved Threads: 7
freesoft_2000 freesoft_2000 is offline Offline
Practically a Master Poster

Ftp

 
0
  #1
Nov 25th, 2006
Hi everyone,

Currently i am trying to connect to a site using ftp using the below method to upload a file

  1. URL url = new URL("ftp://user01:pass1234@ftp.foo.com/README.txt;type=i");
  2. URLConnection urlc = url.openConnection();
  3. OutputStream os = urlc.getOutputStream(); // To upload

Now my question is how from java can i create or delete a directory as well as create or delete a file using ftp?

Is there also a way i can just connect to a ftp site say ftp.foo.com without specifying the file name so that i can connect to the ftp site first, create a file first then go to that file?

Any help is greatly appreciated

Thank You

Yours Sincerely

Richard West
Microsoft uses "One World, One Web, One Program" as a slogan.
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond

Tell me what type of software do you like and what would you pay for it

http://www.daniweb.com/techtalkforums/thread19660.html
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Ftp

 
0
  #2
Nov 25th, 2006
Once you have a connection you can talk over it using the command set provided for that protocol.
So you'll have to write FTP commands to that connection, and read the answers.

The RFC can tell you what those commands are (and there are quite a lot), or you can scour the internet for an FTP library (which I know exists, though I don't have the URL for it).
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC