Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Locking File when uploading / downloading

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
housingbust

Locking File when uploading / downloading

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.