Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 DTS FTP - Unknow file name

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-03-24 : 07:37:37
lbmouse writes "The FTP task in the DTS allows you to connect to an ftp site and download a specific file. How would you handle this if you did not know the name of the specific file?

For example, I need to grab a file every few minutes that has the format cstmtMMDDYYYYHHSSTT.txt. I can't seem to find a way to get the FTP task to allow for filename wildcards or to grab everything in a hot directory. Other than writing a custom ActiveX Script task, do you have any ideas?

Thanks"

nr
SQLTeam MVY

12543 Posts

Posted - 2005-03-25 : 21:46:56
Eaiser to do it from an SP.
see
http://www.nigelrivett.net/FTP/s_ftp_GetFile.html

if you use it with
http://www.nigelrivett.net/FTP/s_ftp_GetDir.html

Then you can download all files that haven't already been retrieved.
I have an SP that does that which I'll post at some time.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -