SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


ActiveX Task to validate Last modified date of source file


ActiveX Task to validate Last modified date of source file

Author
Message
julie-631759
julie-631759
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
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!
John Rowan
John Rowan
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13140 Visits: 4588
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 tooSmile ).


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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search