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

Ganesh S

'LOCK' sign shows on .csv (and for type of files also) on right side (remote panel) in WinSCP

'LOCK' [img] sign shows on .csv (and for type of files also) on right side (remote panel) in WinSCP.
Because of this files are not reading by dbms_ja functions in Oracle.
What could be the reason for locking files?
torix

Re: Handling locked files

Ok, thanks.
martin

Re: Handling locked files

Sorry for the mistake. It does not change my answer though.

The option is available for download only (even in GUI), not for upload.
torix

Re: Handling locked files

@martin: You mention the hidden attribute - I referred to the read-only attribute. I see that functionality to preserve RO is a selectable option in the GUI-application. Not available through the .NET libraries?
martin

Re: Handling locked files

WinSCP does not support preserving hidden attribute, when uploading, as very few servers do support it.

Though your server might support it actually.
torix

Re: Handling locked files

Until a permanent fix is available, we have mitigated by working through the folder content and transferring file for file.

Although read-only (RO) files are our worst enemy, we generally want to preserve the RO attribute from source to destination. In short - a file with the RO attribute set should have this attribute set on the destination file system. Our observation is that RO source files end up on the target file system with RO cleared. Is this by design or will certain class properties need to be set for this attribute to be maintained?
martin

Re: Handling locked files

That's not really related.
torix

Re: Handling locked files

That's great. Although it is possible to work around this issue by looping each file, it will be better to handle it in the multi file methods internally. This will make the code more compact and it will ease the cleanup of empty folders if the move option is used.
martin

Re: Handling locked files

Sure, I'm considering some improvements in this area.
torix

Re: Handling locked files

Thanks for the update and the solution you provided is in the same direction as I though of. Is this an issue that you will look into as an enhancement later? It would be better to track this situation in the events (transfer progress, file transferred) from the Error property.
torix

Handling locked files

We are utilizing WinSCP in conjunction with Powershell and Bitvise SSH Server and generally everything is working great. Our only problem seems to occur when transferring, and replacing, files that the user has opened and somewhat locked in e.g. Excel. In this situation we do not expect this solution to force an overwrite but just skip it and resume with the rest. What we observe is that the file transfer operation is aborted altogether and that subsequent files are missed. From start we ran with the resume option for these transfers but alter decided to disable it.

We have seen this when both using SynchronizeDirectories, Putfiles and GetFiles.

Anyone got similar experiences and solutions?