Solved

SSIS expression - Check when a file has been modified

Posted on 2008-06-20
2
206 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
2 Comments
 
LVL 13

Accepted Solution

by:
rickchild earned 500 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

773 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