Posted: 2012-02-27 17:16
We are currently trying to transfer files using WinSCP SFTP protocol. We are having a problem with the vendor pulling the file before we are able to remove the .filepart extension. Does WinSCP lock the file during file transfer and when does it release it - when the file is completely transferred and the .filepart extension removed, or does it release it when the file is transferred and then attempt to pull it again to do the rename/stripping of the filepart extension?
Thanks for your help.
Posted: 2012-02-28 03:50
Good question! Something I hadn't considered in my implementation.
Martin, keen to hear your response please
The best reference I could find is way back from the v3.2 release notes:
"Uploaded partial file (with .filepart extension) is renamed to target name only after file is closed (SFTP only). This should eliminate problems on servers, where file locking is supported (Windows)."
This seems to indicate that the file lock is very much an S/FTP server function, rather than a WinSCP option... Which makes sense.
Location: Prague, Czechia
Short answer: No.
WinSCP does not lock the file explicitly. Obviously particular implementation of the SFTP server may lock the file, when it is being accessed by SFTP client (WinSCP). It would be perfectly reasonable to do so.
SFTP client can lock the file explicitly with SFTP version 5. WinSCP does not support that yet. And note that the most widely used SFTP server, OpenSSH, does support SFTP version 3 only anyway.
You can post new topics in this forum
And it's free!