Uploading file using batch file with SQL server xp_cmdshell

Advertisement

clarenceassey@gmail.com
Joined:
Posts:
1
Location:
Tanzania

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?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,861
Location:
Prague, Czechia

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).

Reply with quote

Advertisement

You can post new topics in this forum