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

Author Message
bamMorris

Guest


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

martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26890
Location: Prague, Czechia
As per https://winscp.net/eng/docs/faq_scheduler:
The local account that runs the SQL server service probably does not have a network access.
Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License