Topic "Locking File when uploading / downloading"

Author Message
housingbust
[View user's profile]

Joined: 2014-02-06
Posts: 3
Location: Canada
I am using the .Net library to upload/download files.

I *believe* this is the issue I am seeing:
When I use Session.GetFiles(...) it does not appear to lock the file when writing. As a result, I have another application (namely, BizTalk's File Adapter), picking up the file before WinSCP has finished writing it.

My Question to confirm is -- does WinSCP support file locking when downloading/getting? and likewise, when uploading?

I am using SFTP... currently from a UNIX FTP server to Windows machine. However, I will also be uploading from Windows Machine to either/both Unix/Windows as well.

Thank you.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
housingbust wrote:
My Question to confirm is -- does WinSCP support file locking when downloading/getting? and likewise, when uploading?

No, because it has to be supported by the SFTP server in the first place. And absolute majority of SFTP servers (OpenSSH for instance) does not support it.

As an alternative you can force transfer to temporary file name, if the BizTalk's File Adapter can be configured to ignore certain files/extensions.
See https://winscp.net/eng/docs/ui_pref_resume#temporary
_________________
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