Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to do a simple remote file rename to another remote dir on the same FTP connection.
I created a FTP connection and then list the files of dir (/home/ec2-user/bob/) = history_file.txt
And then I would like to rename a file from dir (/home/ec2-user/bob/) to dir (/home/ec2-user/bob/test/) with the same name or another name.
Example:
I'm getting the following error:
Exception in component tFTPRename_1 (ftp_test)
2: No such file
at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
at com.jcraft.jsch.ChannelSftp.rename(ChannelSftp.java:1950)
at local_project.ftp_test_1_0.ftp_test.tFTPRename_1Process(ftp_test.java:1330)
at local_project.ftp_test_1_0.ftp_test.tFTPFileList_1Process(ftp_test.java:1216)
at local_project.ftp_test_1_0.ftp_test.tFTPConnection_1Process(ftp_test.java:672)
at local_project.ftp_test_1_0.ftp_test.runJobInTOS(ftp_test.java:2791)
at local_project.ftp_test_1_0.ftp_test.main(ftp_test.java:2627)
Within a FTP client connection like FileZilla this is a simple rename command see example:
Renaming '/home/ec2-user/bob/history_file.txt' to '/home/ec2-user/bob/test/history_file.txt'
Let me know if I'm missing something as this should be very simple?
Thanks
Hi, this component seems to be used to rename a file not to move it .
so you can do a tftget to get the file on your local system at ftp put to put it on the new directory and a tftpdelete to remove the ancient file.
Send me Love and Kudos