Topic "Using WinSCP to insert a LS lookup into a SQL temp table"

Author Message
lairdmcbride2

Guest


The below command works . .we think . . but the table does not get fed.


select @cmd = '"C:\Program Files (x86)\WinSCP\WinSCP.exe" /script=' + @workdir + @workfilename

create table #a (id int identity(1,1), s varchar(1000))
insert #a
exec master..xp_cmdshell @cmd


and in the work file is this. .


open sftp://MyUN:UnHackablePW@sftpSite.basics.net
ls /users/ftpuic/Time/
quit
lairdmcbride2

Guest


lairdmcbride2 wrote:
The below command works . .we think . . but the table does not get fed.


select @cmd = '"C:\Program Files (x86)\WinSCP\WinSCP.exe" /script=' + @workdir + @workfilename

create table #a (id int identity(1,1), s varchar(1000))
insert #a
exec master..xp_cmdshell @cmd


and in the work file is this. .


open sftp://MyUN:UnHackablePW@sftpSite.basics.net
ls /users/ftpuic/Time/
quit



This code works perfectly with the windows internal ftp.exe application. . . but fails with WinSCP . . .my sad. . .
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
What does the code do? Does it insert a console output of an application to an SQL table?

The winscp.exe is not a console application (like ftp.exe) is). It does not have any output that could be collected. You probably need to use winscp.com.

See http://winscp.net/eng/docs/executables
Advertisements

You can post new topics in this forum






Search Site

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