Posted on: 8/3/2015 10:20:14 AM | Views : 781

Hi,
I wrote stored procedure to send csv file to FTP Server which is working fine.
Now one of our suppliers move to SFTP and have to send same csv to SFTP server which I could not find a relevant material in internet of how to send file to SFTP with the stored procedure.
Code to send to SFTP server:
BEGIN
EXEC master..xp_fileexist @cFileName, @nRetVal OUT IF @nRetVal = 1 BEGIN -- File Exists -- Transfer the file by ftp to the All Fleet Services SET @cmd = 'ftp -i -s:"C:\FTPTransferAF.txt" IP Address' EXEC master..xp_cmdshell @cmd -- ...

Go to the complete details ...