I am running a nightly batch that pulls a file from WinSCP most nights it works correctly but occasionally i get this error occasionally:
transfer binary
file.dat | 0 KiB | 0.0 KiB/s | binary | 0%
Can't open file 'X:\..\SFTP\WinSCP\Data\file.dat'.
System Error. Code: 32.
The process cannot access the file because it is being used by another process
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort
I was wondering if anyone has any thoughts on how this error might occur, I have tried holding the file open but since the file while transferring is a different type that causes nothing. I have tried deleting the file from the WinSCP server in mid transfer but that causes no error. I have pulled the internet out of my computer that causes no error. I get a different error if the file already exists. If any one has any thoughts or if they know how I can go to a different section of the batch if an error is experienced since after the transfer I delete the file it would be very appreciated. Thanks