SFTP Mirror: error32: The process cannot access the file because it is being used by another process
I am using WinSCP (6.1) to mirror SFTP data to the local directory served in the network by Windows Server (shared directory). Users are also able to reach the same directory and open those files (when script finish synchronization from SFTP).
The problem is that synchronization fails when any user open downloaded file. As I am using mirroring WinSCP is checking the content of the target directory to find the differences from source and to copy only missing data.
Is there any way to work around the problem so that WinSCP can deal with open files, e.g. scan by name? Or is it possible for WinSCP to ignore this file, record it in the log and continue working instead of terminating? If yes, how to do it in current version? Of cource, if file is closed by user script works perfect...
I am using a script:
Please find logs with the indicated problem attached.
The problem is that synchronization fails when any user open downloaded file. As I am using mirroring WinSCP is checking the content of the target directory to find the differences from source and to copy only missing data.
Is there any way to work around the problem so that WinSCP can deal with open files, e.g. scan by name? Or is it possible for WinSCP to ignore this file, record it in the log and continue working instead of terminating? If yes, how to do it in current version? Of cource, if file is closed by user script works perfect...
I am using a script:
open sftp://user@sftp_server -rawsettings ProxyMethod=3 ProxyHost=proxy_server ProxyPort=8080 -hostkey="fingerprint_here" -privatekey=D:\xxx\pk.ppk synchronize local -mirror -criteria=either -preservetime \\server\reports /export/