title: Show FTP Server response code in SFTP batch process (PSFTP.exe)
body: <p>Is there a way to display/output FTP server response code in PSFTP.exe?</p>
  
  <p>FTP Server response code example:</p>
  
  <p><code>226 Transfer OK</code></p>
  
  <p><code>200    Command okay</code></p>
  
  <p>My code:</p>
  
  <p><code>psftp.exe username@hostname -pw password -v -b batch_file &gt; output_file 2&gt;&amp;1</code></p>
  
  <p>batch_file:</p>
  
  <pre><code>put some_file
  quit
  </code></pre>
  
  <p>Output_file:</p>
  
  <pre><code>Looking up host "....."
  Connecting to ..... port 22
  Server version: SSH-2.0-OpenSSH_3.9p1
  We claim version: SSH-2.0-PuTTY_Release_0.60_(Centrify_GSS_1.4)
  Using SSH protocol version 2
  Doing Diffie-Hellman group exchange
  Doing Diffie-Hellman key exchange with hash SHA-1
  Host key fingerprint is:
  ssh-rsa 1024 ....
  Initialised AES-256 SDCTR client-&gt;server encryption
  Initialised HMAC-SHA1 client-&gt;server MAC algorithm
  Initialised AES-256 SDCTR server-&gt;client encryption
  Initialised HMAC-SHA1 server-&gt;client MAC algorithm
  Using username ....
  Sent .....
  Access granted
  Opened channel for session
  Started a shell/command
  Sent EOF message
  Server sent command exit status 0
  Disconnected: All channels closed
  Connected to ......
  Remote working directory is ....
  local:some_file =&gt; remote: some_file_path_on_server
  </code></pre>