•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 391,554 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,603 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 810 | Replies: 1
![]() |
•
•
Join Date: Jun 2004
Posts: 604
Reputation:
Rep Power: 6
Solved Threads: 6
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
URL url = new URL("ftp://user01:pass1234@ftp.foo.com/README.txt;type=i");
URLConnection urlc = url.openConnection();
OutputStream os = urlc.getOutputStream(); // To uploadNow 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
•
•
Join Date: Nov 2004
Location: Netherlands
Posts: 5,646
Reputation:
Rep Power: 18
Solved Threads: 191
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).
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Java Marketplace
- 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



Linear Mode