?
Solved

SSIS expression - Check when a file has been modified

Posted on 2008-06-20
2
Medium Priority
?
221 Views
Last Modified: 2013-11-30
Hi,

In SSIS, how can you write an expression that checks if a file got modified today?

Thank you.
0
Comment
Question by:Endelm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 13

Accepted Solution

by:
rickchild earned 2000 total points
ID: 21831606
You can use a Script Task to do this using the "File.GetLastWriteTime" method.

You can make the script task write the result to a package variable.

Something like:  File.GetLastWriteTime("C:\Test1.txt").ToString()

http://msdn.microsoft.com/en-us/library/system.io.file.getlastwritetime.aspx
0
 

Author Closing Comment

by:Endelm
ID: 31469130
Thank you! :-)
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question