Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Uploading file using batch file with SQL server xp_cmdshell

Please attach a full session log file showing the problem (using the latest version of WinSCP).
clarenceassey@gmail.com

Uploading file using batch file with SQL server xp_cmdshell

Batch file contents
@echo off
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="<log file path>" /ini=nul /command ^
   "open <ftp site> -rawsettings FSProtocol=2 -hostkey=""<host key>""" ^
 "put -nopreservetime <upload file> /Outbox/eqmvmt/" "exit"
exit /b

When run batch file using SQL server xp_cmdshell I get return of 1 (from xp_cmdshell) although the upload was completed. Any idea?