Solved

SSIS expression - Check when a file has been modified

Posted on 2008-06-20
2
217 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 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

717 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