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
 SQL Server Development (2000)
 DTS Package

Author  Topic 

sonmanvb
Starting Member

6 Posts

Posted - 2003-04-29 : 11:09:30
I have created a DTS package the will ftp a file from our ftp site, then move the data from the file into a temp table then it calls a sproc to put the data in the tables where they need to be.
This package works fine but would like to know how I can check the file to see if the package needs to run. The file it is ftping only gets put on the ftp site 10 times a year. I have the package running once a week but it does not need to get the file if it is the same file as the last time it ran.

Thanks in advance
sonmanvb

ValterBorges
Master Smack Fu Yak Hacker

1429 Posts

Posted - 2003-04-29 : 11:20:26
Create an ActiveX Step in the task that creates a FileSystemObject and checks the file creation date.

Check out www.sqldts.com for articles on ActiveX FileSystemObject
and workflow.

http://www.sqldts.com/default.aspx?6,101,292,0,1
http://www.sqldts.com/default.aspx?6,103,214,7,1
http://www.sqldts.com/default.aspx?6,103,211,0,1

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbenlr98/html/vaobjfilesystemobject.asp

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject.html

Edited by - ValterBorges on 04/29/2003 11:21:51

Edited by - ValterBorges on 04/29/2003 11:23:37
Go to Top of Page

sonmanvb
Starting Member

6 Posts

Posted - 2003-05-05 : 11:28:06
Thanks for the help.
I am still working on it but it looks
like this will work.

sonmanvb

Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2003-05-05 : 13:00:53
You can also do this from an SP

See www.nigelrivett.com
FTP using t-sql
FTP Get Directory t-sql
FTP Put File using t-sql


==========================================
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 -