Any idea why I am getting exit code 1 as opposed to exit code 0? This batch script is part of a larger powershell script with conditional actions firing on non-0 exit code, so I am eager to resolve this. Please let me know if there are any suggestions. In addition to trying this with version 5.0.7, I have also tried 4.3.7.

I have sent you an email with a development version of WinSCP to address you have used to register on this forum.

Hello,

I tried this again with the version of WinSCP you sent me. It did not return any value for an exit code this time, though perhaps that was intentional on your part, since the exit code now appears in the log file.

Found the issue

Thanks for your help. I found the problem, and it turned out to be a problem with the Powershell code I am using to execute winscp.com.

For the benefit of anyone else that may run into this- If you launch winscp.com within powershell, or any external executable for that matter, using Start-Process- The exit code is not stored in the environment variable $lastexitcode. THis is why my script was failing. I believe when I first reported the trouble I was observing a $lastexitcode value of 1 based on another command I had launched earlier in the same session, and the exit code was still stored.