echo Running OCS FTP
start C:\"Program Files (x86)"\WinSCP\winscp.com /script=D:\FTP\Optum\OCSFTPDownload.txt /log=D:\FTP\Optum\OCSLog.txt
if errorlevel 1 goto error
startto run WinSCP? It's no used in any example on this site. Remove it.
startlaunches WinSCP asynchronously not waiting for its exit. So when testing exit code, you are actually testing exit code of the previous command, the
echo, that is always 0.
You can post new topics in this forum