Java Delete File On Ftp Server

How To Delete File On Ftp Server

My Problem is need to Transfer files from one remote server to another remote server (may be FTP/SFTP) but there is no direct method to transfer files from one remote. Our server is Unix server. Using jdk 1.7 and I am looking for a solution to delete files on the ftp server that are N weeks old. Action Games For Pc Without Graphic Card here. Found Apache FTPClient example but. 2005 Ford Escape Check Engine Code Manually.

I think you need to do the retrieve and delete in two separate operations; says, in part: This class Opens an FTP input (or output) stream given a URL. It works as a one shot FTP transfer: Login Get (or Put) the file Disconnect I did not see any methods in the documentation that would allow deleting a file. How To Patch Holes In Jeans Knees here. You may wish to use the URL mechanism to retrieve the file, but I would drop down to using raw sockets to delete the file. Create a new connection to the FTP command port, log in, and issue the DELE command manually. If this is the only step you're taking, you might be able to get away with doing relatively poor error handling and maybe only two read() requests and simply show the output transcript to the user once you're done. It's a bit dirty, but I completely understand not wanting to carry around a megabyte of additional source to achieve the moral equivalent of echo -e 'user foo npass password ndele /path/to/file nlogout' nc ftp.remote.example.com 21.

FTPSBlackbox includes its own implementation of SSL/TLS/DTLS protocol family and doesn't include external code such as OpenSSL, OpenSSH, etc.

Comments are closed.