File gets transferred when executing command file directly but not remote login

Advertisement

bamMorris
Guest

File gets transferred when executing command file directly but not remote login

Version of WINCP:5.9
Windows: Windows server 2012 R2
transfer Protocol: SFTP
Scripts: ftp.cmd
open sftp://login:password@website/ -hostkey="ssh-rsa 1024 xx:xx:db"
put \\PPP\PosData\Bofa_00193.txt /incoming/arp/ -nopreservetime -nopermissions
exit
Batch File:
\\PPP\\WinSCP\WinSCP.exe /log=\\PPP\PosData\WinSCP.log /ini=nul /script=\\PPP\PosData\ftpcmd.txt

If I login as the remote user (for example XXX\myuser) and execute the batch file the file transfers. When the batch file gets executed from SQL Server using xp_cmdshell it executes it using the same login but the file does not transfer.
  • Workinglog.txt (7.54 KB, Private file)
Description: Log file from working attempt
  • scriptfailure.txt (3.3 KB, Private file)
Description: Log file from failed attempt

Reply with quote

Advertisement

You can post new topics in this forum