Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
RVeitch_84
Creator
Creator

tFTPRename

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:

0695b00000G5qvcAAB.jpg 

0695b00000G5r0IAAR.jpg 

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

Labels (4)
1 Reply
gjeremy1617088143

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