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

Author Message


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

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

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License