How to check the created date of flat file using SSIS?
I had a ssis package which loads data from a flat file at particular location to a table in SQL Server Database. There is a batch job which runs and loads the flat file to that location . Is there any way using SSIS to check the modified date on the flat file? Thanks in advance.
March 13th, 2011 11:08am

Yes, for sure, just use a script task. There use File.GetAttributes . Found you an example: http://jamelcato.com/how-to-check-a-file%E2%80%99s-last-modified-date-using-ssis/ Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
March 13th, 2011 11:16am

Forgot to tell you that there is a CodePlex component called File Properties Task free to use: http://filepropertiestask.codeplex.com/Arthur My Blog
March 13th, 2011 11:18am

you can use this code to find out CreationTime,LastAccessTime,LastWriteTime: System.IO.FileInfo finf = new System.IO.FileInfo(@"C:\SSIS\Files\testFile.txt"); DateTime creationTime= finf.CreationTime; DateTime lastAccessTime = finf.LastAccessTime; DateTime lastWriteTime= finf.LastWriteTime; http://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
March 13th, 2011 11:49am

Here is an example of filedates and SSIS: http://microsoft-ssis.blogspot.com/2011/01/use-filedates-in-ssis.html Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com
March 13th, 2011 12:07pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics