ActiveX Task to validate Last modified date of source file

  • 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!

  • 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[/url] - by Jeff Moden

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply