Topic "File rename when upload is finished"

Author Message
AlLeX_
[View user's profile]

Joined: 2012-10-11
Posts: 13
Hi All,

I have the following task to do: Upload large files to the sftp server and when the upload process finishes I have to rename the file so that I can mark this as uploaded and ready for further processing. So my question is - is there anything that I can use to automatically rename the remote file when the upload finishes?

Thanks!
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
You can rename file explicitly after upload using mv command:
http://winscp.net/eng/docs/scriptcommand_mv

If you do not have any specific naming convention, you can make use of "Transfer to Temporary Filename" feature that uploads file with .filepart extension and removes it after transfer finishes. It's possible with SFTP protocol only. It's done automatically for large files.
http://winscp.net/eng/docs/resume#automatic
AlLeX_
[View user's profile]

Joined: 2012-10-11
Posts: 13
Thank you, I will use one of them Smile
AlLeX_
[View user's profile]

Joined: 2012-10-11
Posts: 13
Hello Martin,

I am trying the first option. I have set Enable Transfer Resume/ Transfer to Temporary File Name for All Files. But When I am uploading a file its name does not change during the upload process. I am opening the second session to the SFTP server during the upload and can see that the file name is the same. Am I missing something?

Thanks!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
AlLeX_ wrote:
I am trying the first option. I have set Enable Transfer Resume/ Transfer to Temporary File Name for All Files. But When I am uploading a file its name does not change during the upload process. I am opening the second session to the SFTP server during the upload and can see that the file name is the same. Am I missing something?

Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License