December 22, 2004 at 11:50 am
I have some DTS packages that manipulate data and export 3 files into a drive. I am trying to use EXECUTE PROCESS TASK at the SUCESSFULL completion of these packages to FTP these files, but the Move_MyFiles.cmd hangs after the FTP line in the following file:
cd w:
ftp
open ThisFTPSite ThisPort
user MyUserName MyPassWord
bin
put File1
put File2
put File3
bye
This works fine via the CMD prompt, thus I thought it would work by simply copying it to a .CMD file but no luck. If I run this via a CMD prompt, i.e. Move_MyFiles.cmd, it hangs at ftp> without running the next line: open ThisFTPSite ThisPort.
I am assuming I need to run the FTP command with the OPEN and USERNAME and PASSWORD together but don't know how.
Any assistance will be greatly appreciated.
December 23, 2004 at 12:34 pm
You need to code the cmd file to something like this:
echo open ThisFTPSite ThisPort> Tempfile
echo MyUserName>> Tempfile
echo MyPassWord>> Tempfile
echo bin>> Tempfile
echo put File1>> Tempfile
echo put File2>> Tempfile
echo put File3>> Tempfile
echo bye>> Tempfile
ftp -s:Tempfile
December 23, 2004 at 12:55 pm
Thanks! That's it!
December 23, 2004 at 2:22 pm
Even better.
Use the custom DTS FTP task from SQLDTS,
http://www.sqldts.com/default.aspx?302
Unlike the standard FTP task, this one allows sending and receiving of files instead of fiddling around with external .CMD files.
--------------------
Colt 45 - the original point and click interface
December 23, 2004 at 2:26 pm
Thanks for the article! Good stuff!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply