Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

ActiveX Task to validate Last modified date of source file Expand / Collapse
Author
Message
Posted Wednesday, July 02, 2008 2:43 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, April 29, 2009 9:27 PM
Points: 1, Visits: 12
I have a DTS package that takes data from a text file and loads it into a table. The source file does not change names, but it is updated by another process daily. Before I load the data into my table, I want to verify that the source file has been updated (therefore having a last modified date = today). I have gotten as far as setting a global variable for the last modified date for the file, but I don't know what to write in the ActiveX code window to verify that the lmd equals today's date.

TIA!
Post #527637
Posted Wednesday, July 02, 2008 4:31 PM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Wednesday, October 23, 2013 12:46 PM
Points: 3,843, Visits: 3,833
I'm just heading out of the office, so I don't have time to write the script for you, but what you'll need to do is create a file system object so you can access the file and check the file properties. Here's a great resource for scripting, check out the section on VBscript>>Objects>>FileSystemObject>>GetFile.

Sorry to be so short, but you know the old saying....Give a man a fish and he'll eat for a day, teach a man to fish and he'll sit around and drink beer all day (this applies for women too:) ).


Oops, here's the link: http://www.devguru.com/utilities/search.asp




John Rowan

======================================================
======================================================
Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
Post #527681
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse