If you require checking results of each command individually, you should better use the WinSCP .NET assembly. Alternatively, see the guide Advanced FTP/SFTP scripting for examples of checking script results (including XML log parsing) using more powerful languages and the guide to Interpreting XML log for advanced scripting using C# language.