I am trying to execute a command to transfer data file within SQL job agent using FTP
I have created a dos batch file called ftp2site.scr:
--ftp2site.scr:
REM -- BEGIN BATCH File
@echo off
open 216.22.1.333
mylogin
mypass
cd /user/download
put "CustDataFile.xls"
bye
REM -- End OF FIle
FTP works ok using Dos compand
C:>ftp -s:ftp2site.scr
However I am trying to execute this command within SQL2005
exec master.dbo.xp_cmdshell 'ftp -s:c:\temp\ftp2site.scr'
I am getting an error that it cannot find the file.
Any thought, Examples or hints how can I ftp the files.
Thank you
I have created a dos batch file called ftp2site.scr:
--ftp2site.scr:
REM -- BEGIN BATCH File
@echo off
open 216.22.1.333
mylogin
mypass
cd /user/download
put "CustDataFile.xls"
bye
REM -- End OF FIle
FTP works ok using Dos compand
C:>ftp -s:ftp2site.scr
However I am trying to execute this command within SQL2005
exec master.dbo.xp_cmdshell 'ftp -s:c:\temp\ftp2site.scr'
I am getting an error that it cannot find the file.
Any thought, Examples or hints how can I ftp the files.
Thank you