Friday, February 17, 2012

Execute ftp script

Hi !

We have a sql 2000 with sp2.

We wan't to execute a *.cmd file with a ftp command.
The ftp.cmd file is working ok interactive.
But if add it to enterprice manager/SQL Server Agent/Jobs we get failed.

Here are the cmd file:

@.echo off
del d:\mtdaxel\ftppmlogg.txt

date /T >> ftppmlogg.txt
time /T >> ftppmlogg.txt

ftp -n -s:ftppm.ftp >> ftppmlogg.txt
exit

Any sugestion "please" for our problem.

Regards Jan RockstedtHave you tested this script outside of SQL Server Agent jobs ?

The message you are receiving indicates that something is invalid with your ftp statement. The only thing that might be incorrect in your statement is the filename "ftppm.ftp". Since you are not using an absolute path, when the agent runs the job the path is probably incorrect. Try using an absolute path.

Good luck.|||Yes i have test it outside.

I will try the absolute path tomorrow.

Thanks !!!!

//Jan|||Yes it was the path.

Thanks rnealejr !!!!

:)|||Yes it was the path.

Thanks rnealejr !!!!

:)

No comments:

Post a Comment