January 11, 2002 at 1:22 pm
I could use some step by step help on using the DTS FTP. I need to pull a file from an FTP site, and the filename changes daily. Only the first two characters ('al') and the '.txt' extension are how I identify which file to get. How can I set up the FTP task to scan the FTP site and pull the correct file? I'm just getting started using DTS/ActiveX etc. Thanks!
January 11, 2002 at 2:34 pm
Can you predict the filename? If so, you can use the dynamic properties task to change it.
Steve Jones
January 11, 2002 at 2:42 pm
Generally speaking yes, it will be the current date in YYMMDD format. But sometimes we have to load multiple files (old files) - and so I need to grab all files.
January 11, 2002 at 2:49 pm
You can setup the FTP task and use the dyanmic properties task to change the files that will be picked up. I am not sure you can automate this if you cannot determine what to pick up in advance.
You can check out my PushFTP article (http://www.sqlservercentral.com/columnists/sjones/pushftp.asp) and easily modify that to do an mget *.* and get all files. Of course, you will still need some other routine to then work with the files you have gotten.
Steve Jones
January 11, 2002 at 2:55 pm
Your push routine was easiest to use - I put it in an execute process task and it works exactly as I need it to. You would think the FTP task would be easily modified, but I guess not.
Thanks!
January 11, 2002 at 4:28 pm
January 25, 2002 at 7:27 am
OK Steve, this is a good idea and i have implemented it.
But i can manage the result of the "Execute process task" or get the output of it ?
The error i want to manage may be, e.g., the username/password not correct or node unreachable.
Thanks
January 25, 2002 at 9:51 am
I'd pipe the output of the execute results task to a file and search it. This is probably the best technique, though your search routine may be cumbersome.
I did a quick test, and you will need to run the ftp or other process from a batch file and pipe the results using the batch file.
Steve Jones
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply