943,827 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1262
  • Java RSS
Nov 25th, 2006
0

Ftp

Expand Post »
Hi everyone,

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

Java Syntax (Toggle Plain Text)
  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
Similar Threads
Reputation Points: 25
Solved Threads: 10
Practically a Master Poster
freesoft_2000 is offline Offline
623 posts
since Jun 2004
Nov 25th, 2006
0

Re: Ftp

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).
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Class in a class...
Next Thread in Java Forum Timeline: project problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC