How to move CSV file in FTP server one folder to another? <p>When i am trying to move file from fileDirectory1 to fileDirectory2 .. Is there any way to move or copy that file from one path to another in one FTP server.Please anyone can help me.</p> <p>Here is my sample code:</p> <pre><code> String existingfile = file.getFilename(); String newfile =file.getFilename(); String fileDirectory1 = clients.getFtpFolder() + "/" + "unprocessed" + "/"; String fileDirectory2 = clients.getFtpFolder() + "/" + "processed" + "/"; sftpChannel.cd(fileDirectory1); if (sftpChannel.get(newfile) != null){ sftpChannel.rename(fileDirectory1 + newfile , fileDirectory2 + newfile ); sftpChannel.cd(fileDirectory2); sftpChannel.rm(existingfile ); } </code></pre> <p>Console:</p> <pre><code>Caused by:2: No such file at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2846) </code></pre> <p>I have tried <a href="http://stackoverflow.com/questions/30050045/how-to-move-file-from-directory-a-to-directory-b-in-remote-server">How to move file from directory A to directory B in remote server?</a></p> <p><a href="http://stackoverflow.com/questions/13277218/move-a-directory-in-remote-server-to-another-location-in-the-same-remote-server">Move a directory in remote server to another location in the same remote server using jsch</a></p>