Groups | Blog | Home
all groups > sql server dts > june 2004 >

sql server dts : FTP task


Chris Kennedy
6/7/2004 3:04:31 PM
Can anyone suggest how I go about using the FTP task to download the
contents of a directory on an FTP server when the filenames are always
different. The legacy software in our organisation will output x amount of
dat files all with unique name. They will sit on an FTP server. I need to
copy them to a local folder for the SQL Server and then process them. It's
the getting them to the local folder that's got me foxed.

Could I just copy the folder? I am a total newbie to DTS so the more
straightforward the better. Regards, Chris.

Sue Hoegemeier
6/10/2004 1:39:22 PM
Chris,
You can loop through a folder using the FileSystemObject and an
ActiveX script task. When you are looping through the files, you can
use the FileSystemObject class to check file properties, conditionally
copy if needed, etc. You can also process the files while you are
looping through the directory if that works for your situation. The
following articles should help get you started and give you some ideas
on how to accomplish what you are trying to do:
HOW TO: Recursively Search Directories by Using FileSystemObject
http://support.microsoft.com/?id=185601
Looping, Importing and Archiving
http://www.sqldts.com/default.aspx?246

-Sue

On Mon, 7 Jun 2004 15:04:31 +0100, "Chris Kennedy"
[quoted text, click to view]
AddThis Social Bookmark Button