Issues with WinSCP PUT -delete option
I have the below script to transfer files to remote server(Unix) and then delete the files in the local directory. But once in a day we are seeing the below error.
1 out of 100 files was not copied to the remote directory and is also being deleted from the local folder. Can someone please help me to know if there is a way to NOT delete the file if it was not transferred to the remote server.Script: System Error. Code: 2.
The system cannot find the file specified
We are using WinSCP Version 5.1.7(Build 3446)
Here is the batch script that runs every one minute.
@echo off start winscp /console /script="C:\CDI\SFTP.txt" /log=SFTP.Log
option batch abort option confirm off open sftp://user:password@HostName -hostkey="ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:x:xx:xx:xx" lcd C:\input\ cd inbound option transfer binary put -delete File_20141214230801099.txt chmod 777 File_20141214230801099.txt close exit
Kumar