View Full Version : Java FTP Delete?

01-24-2012, 01:20 AM
I've managed to create an FTP client that uploads and downloads files from a server. What I can't figure out is how to do an FTP delete. Can anyone help me on that? I don't want to use an API or someone else's class. (How would I learn from that?

I've tried looking through some existing API's for hints, but their too complicated for me to figure out. You have to go from function to function in tons of files and I still don't get it.

Any help or suggestions would be great! Thanks everyone.

01-24-2012, 02:42 PM
Unfortunately it won't get a whole lot easier either. Custom packages are made to simplify a task for other people. I can appreciate wanting to build yourself though.
The first place to start when dealing with protocols is to go to the rfc defining the protocol and how communication works with it. FTP rfc is http://www.ietf.org/rfc/rfc959.txt. If you have a socket set up already and can move files, then chances are you are where you need to be. The command to send to a server to delete a file is DELE.