check file property in SSIS
how can i check a property for a file, for example the creation date and if it's before the current date to do other task like sending email .. is this possible in SSIS ? and if yes, how can i do that ?
November 8th, 2011 1:26am
It is not possible with SSIS out-of-box, but you can use a Script Task to leverage .NET, which does have some functions to do this. Check out the FileInfo class: http://msdn.microsoft.com/en-us/library/system.io.fileinfo.aspx There is also a 3rd party component on CodePlex available who can do this task for you: http://filepropertiestask.codeplex.com/MCTS, MCITP - Please mark posts as answered where appropriate. Answer #1: Have you tried turning it off and on again? Answer #2: It depends...
November 8th, 2011 2:41am
Using script task it is possible to read file created datatime Use file.GetCreationTime() or directory.GetCreationTime() methods in the scripttask and capture in a variable DateTime dt = File.GetCreationTime()
November 8th, 2011 2:42am
well i found a complete example which shows more than what i need in the following link: http://microsoft-ssis.blogspot.com/2011/01/use-filedates-in-ssis.html also in the following link he moves and renames the file: http://sqlserversolutions.blogspot.com/2009/04/copyrename-file-using-file-system-task.html anyway thanks for your replies
November 8th, 2011 4:50am
well i found a complete example which shows more than what i need in the following link: http://microsoft-ssis.blogspot.com/2011/01/use-filedates-in-ssis.html This is a follow up on that blog post (with even more file properties): http://microsoft-ssis.blogspot.com/2011/03/get-file-properties-with-ssis.html Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com
November 8th, 2011 6:17am