How to copy a file in FTP server using FTPClient in Java?
<p>I have a CSV file, and I need to copy it and rename it <em>in the same path</em>.</p>

<p>I tried this after the FTP login:</p>

<pre><code>InputStream inputStream = ftpClient.retrieveFileStream(cvs_name +".csv");
ftpClient.storeFile(cvs_name2 + ".csv",inputStream);
</code></pre>

<p>But when I verify the file on the server, it's empty. How can I copy a file and rename it? </p>