Using a batch file, I call a WinSCP script. The process is fully functional
and, if files are available, will execute perfectly. However, if no files are present, no error code or warning code is being generated that I can tell. The calling batch file sends emails to a team based on whether or not a file was present and this is hampering that functionality. For various reasons, I can only check for a download from the log file. In my FTP experience, there is always a clearly indicated error, or at least warning - ex. 'File not found'. This is not the case in the SFTP log.
I am connecting to Ipswitch's MOVEit when a batch file calls WinSCP.com, uses a local .ini, and a small script. The WinSCP Version is 5.5.4 running on Win7 Enterprise, SP1. I have included the text of the calling file and the WinSCP script below, tho I omitted parts of the batch file that were not relevant.
I have been searching the net, Stack Overflow, the WinSCP support pages, and other resources and it appears I should be getting a plain text response or at least an error code or warning code returned. The closest thing I can find is "status code" or "special code" in the log file but neither of these seem to correspond to no files found. A log level 1 is attached with sensitive info changed to generic. I also included a copy of the XML log.
Am I missing something completely? Is the remote server not configured to send me this information? Is there just no error of this type to be returned? It works perfectly, every time, but no recorded log entries if files don't exist.
Calling line from batch:
START /WAIT WinSCP.com /console /script=WSCP-GetRDC.txt /log=%log% /xmllog=%log2%
option batch on
option confirm off
open sftp://USER/PASS/HOST -hostkey="KEY HERE" -timeout=60 -passive=on
option transfer binary
get -delete *.ext1 "\\MyPath\Folder\"
get -delete *.ext2 "\\MyPath\MyFolder"