Renaming files on remote FTP server

Core FTP client questions and answers
Locked
ssebr
Posts: 1
Joined: Wed Oct 01, 2008 2:57 pm

Renaming files on remote FTP server

Post by ssebr »

I use the CoreFTP command line interface (build 1575) to upload files to a remote FTP server, using SSL (via a site profile).

The problem is, the client at the remote end sometimes tries to pick up files that haven't finished transmitting, and so their automated process fails.

I would like to send the files with a .tmp file extension (which the remote site ignores), and then rename them with a .txt file extension when the transfer has finished, which the remote site will then recognise and pick up.

I've seen some references to RNFR and RNTO commands in this group - would they be suitable for this task, and if so how would I include them in the profile? Or is there some other method that would stop the files being accessed until they were fully transmitted?

Many thanks for any assistance.
ForumAdmin
Site Admin
Posts: 1011
Joined: Mon Mar 24, 2003 4:37 am

Post by ForumAdmin »

RNFR %1
RNTO /destination_folder/%1


SFTP will usually need the full path.

RNFR /home/user/%1
RNTO /home/user/backup/%1


These commands will go in the site profiile -> advanced -> script/cmds -> post transfer commands field
Locked