Topic "Upload-then-rename STOU - like Functionality"

Author Message


When uploading large files, particularly any sort of large flat file databases, it is generally best and safest to, for example (say example.txt):

1. upload 'example.txt' to a temporary filename on the host, like 'example_temp.txt'
2. delete the remote 'example.txt' file
3. rename the remote 'example_temp.txt' file to 'example.txt'

If the file in question is a large file, the advantage is that the time the file is 'missing' or incomplete is only the delay between steps 2 & 3. Depending on server OS, step 2 may not be needed anyway.

Many FTP clients do this automatically for all uploads, using the STOU command, followed by a rename. (thus eliminating virtually ANY delay). Of course, there is no real need for an STOU command, as the client could generate a unique temporary filename on its own.

I can't seem to find how to do enable this with WinSCP.

In my case, I have some clients who use flat file databases. If a 1mb database takes 5 seconds to upload, then web users who visit during this 5 seconds may get strange results if the file is used for generating, say... anything.

It's a fairly common feature, and may already be present in WinSCP. If so, please tell me where.


I just found out that Mlaco suggested the same feature in April in his/her post "Web Site Visited During Files Upload".

My apologies for re-suggesting the same thing. It's a really big issue for uploading php files, no doubt.

Any word on a timeline for implementation?
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27105
Location: Prague, Czechia
Added to TODO list, no timeline though.
Martin Prikryl

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License