| | |
Ftp
![]() |
•
•
Join Date: Jun 2004
Posts: 609
Reputation:
Solved Threads: 7
Hi everyone,
Currently i am trying to connect to a site using ftp using the below method to upload a file
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
Currently i am trying to connect to a site using ftp using the below method to upload a file
Java Syntax (Toggle Plain Text)
URL url = new URL("ftp://user01:pass1234@ftp.foo.com/README.txt;type=i"); URLConnection urlc = url.openConnection(); 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
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
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).
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.
![]() |
Similar Threads
- HELP WITH FTP, PLEASE: (Visual Basic 4 / 5 / 6)
- Tek's FTP (Networking Hardware Configuration)
- FTP files (Geeks' Lounge)
Other Threads in the Java Forum
- Previous Thread: I need an Explanation of Recursion...
- Next Thread: project problem
| Thread Tools | Search this Thread |
911 actionlistener addressbook android api append applet application array arrays automation binary blackberry block bluetooth character chat class client code component consumer csv database desktop developmenthelp eclipse error fractal ftp game givemetehcodez graphics gui html ide image integer j2me j2seprojects japplet java javaarraylist javac javaee javaprojects jni jpanel julia lego linked linux list loops mac map method methods mobile netbeans newbie number objects online oriented panel printf problem program programming project projects properties recursion replaydirector reporting researchinmotion rotatetext rsa scanner se server set singleton sms sort sql string swing test textfields threads time title tree tutorial-sample ubuntu update windows working






