<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SSIS:: Test for Data Files Existence</title>
	<atom:link href="http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/feed/" rel="self" type="application/rss+xml" />
	<link>http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/</link>
	<description>Data Warehouse, ETL, and Whatever Else</description>
	<lastBuildDate>Tue, 20 Oct 2009 22:07:00 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: theonebalance</title>
		<link>http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-87</link>
		<dc:creator>theonebalance</dc:creator>
		<pubDate>Fri, 16 Oct 2009 14:21:18 +0000</pubDate>
		<guid isPermaLink="false">http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-87</guid>
		<description>Perfect. Thanks for taking the time to post.</description>
		<content:encoded><![CDATA[<p>Perfect. Thanks for taking the time to post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: markp3rry</title>
		<link>http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-86</link>
		<dc:creator>markp3rry</dc:creator>
		<pubDate>Fri, 11 Sep 2009 10:34:41 +0000</pubDate>
		<guid isPermaLink="false">http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-86</guid>
		<description>What a great article. This really helped me out today and was very simple to implement. Thanks!</description>
		<content:encoded><![CDATA[<p>What a great article. This really helped me out today and was very simple to implement. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: colinmacguire</title>
		<link>http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-83</link>
		<dc:creator>colinmacguire</dc:creator>
		<pubDate>Tue, 19 Aug 2008 15:01:15 +0000</pubDate>
		<guid isPermaLink="false">http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-83</guid>
		<description>Hi Zack,

Sorry for only replying now, been a hectic few days here. Thanks a lot for your comment, sorted me out straight away.

Have a good one!

Colin.</description>
		<content:encoded><![CDATA[<p>Hi Zack,</p>
<p>Sorry for only replying now, been a hectic few days here. Thanks a lot for your comment, sorted me out straight away.</p>
<p>Have a good one!</p>
<p>Colin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kishorejb</title>
		<link>http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-82</link>
		<dc:creator>kishorejb</dc:creator>
		<pubDate>Mon, 18 Aug 2008 12:35:49 +0000</pubDate>
		<guid isPermaLink="false">http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-82</guid>
		<description>Hi Zack,
        Your post really helped me lot. In my situation: a text file with name &quot;&#039;ftp.May08&#039;.txt&quot; will come in a common folder say FTP on May. On June, it will come as &quot;&#039;ftp.June08&#039;.txt in common folder FTP. Here in your example, the file name is constant.I want to check the different file name with same extension(.txt). If you provide a solution for this,it would be great help for meThanks,</description>
		<content:encoded><![CDATA[<p>Hi Zack,<br />
        Your post really helped me lot. In my situation: a text file with name &#8220;&#8216;ftp.May08&#8242;.txt&#8221; will come in a common folder say FTP on May. On June, it will come as &#8220;&#8216;ftp.June08&#8242;.txt in common folder FTP. Here in your example, the file name is constant.I want to check the different file name with same extension(.txt). If you provide a solution for this,it would be great help for meThanks,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zack</title>
		<link>http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-81</link>
		<dc:creator>Zack</dc:creator>
		<pubDate>Wed, 13 Aug 2008 15:32:58 +0000</pubDate>
		<guid isPermaLink="false">http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-81</guid>
		<description>Colin.

It&#039;s been a while since I&#039;ve looked at this post. But I think this might be your answer. Try the following:

Go to the Control Flow
Click on the background so you can get the Control Flow&#039;s properties settings
Under &#039;Delay Validation&#039;, set that to True

I&#039;ve been out of SSIS development as of late, but I&#039;m pretty sure that making that setting is ok to do. It seems to work when I rebuild a test package.</description>
		<content:encoded><![CDATA[<p>Colin.</p>
<p>It&#8217;s been a while since I&#8217;ve looked at this post. But I think this might be your answer. Try the following:</p>
<p>Go to the Control Flow<br />
Click on the background so you can get the Control Flow&#8217;s properties settings<br />
Under &#8216;Delay Validation&#8217;, set that to True</p>
<p>I&#8217;ve been out of SSIS development as of late, but I&#8217;m pretty sure that making that setting is ok to do. It seems to work when I rebuild a test package.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: colinmacguire</title>
		<link>http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-79</link>
		<dc:creator>colinmacguire</dc:creator>
		<pubDate>Tue, 12 Aug 2008 09:55:40 +0000</pubDate>
		<guid isPermaLink="false">http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-79</guid>
		<description>Hi Zack,

Great post, thanks a lot. I&#039;ve got a bit of an issue though and your help would be appreciated. 

First question: I have quite a few XLS data sources, and even though I implemented this code SSIS Still moans that the Source file does not exist. Do you know how I get past this issue?

Second Question: I disabled the control flow for the portion of the package that gives an issue so that I could test the code, and the package the runs fine. The issue that I have is that even after setting a condition in the precedence constraint the Script task doesn&#039;t seem to go and update the File Exists variable. I had to alter the code slightly to work with the variables that I already had.

The code as it currently looks can be found below:

Imports System
Imports System.Data
Imports System.Math
Imports System.IO
Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain

    &#039;   DATE:       12 August 2008
    &#039;   AUTHOR:     Colin Macguire
    &#039;   OTHER INFO: Code sourced from http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/

    Public Sub Main()
        Dim fileLoc, fileName As String
        If Dts.Variables.Contains(&quot;User::Var_Source_Path&quot;) = True AndAlso _
        Dts.Variables.Contains(&quot;User::Var_Source_Name&quot;) = True Then
            fileLoc = CStr(Dts.Variables(&quot;User::Var_Source_Path&quot;).Value)
            fileName = CStr(Dts.Variables.Item(&quot;User::Var_Source_Name&quot;).Value)
            &#039;System.Windows.Forms.MessageBox.Show(&quot;FileDir:&quot; + fileLoc + &quot;FileName:&quot; + fileName)
            If File.Exists(fileLoc + fileName) Then
                Dts.Variables.Item(&quot;User::Var_Source_Exists&quot;).Value = True
                &#039;System.Windows.Forms.MessageBox.Show(”File exists”)
            Else
                Dts.Variables.Item(&quot;User::Var_Source_Exists&quot;).Value = False
                &#039;System.Windows.Forms.MessageBox.Show(”File not exists”)
            End If
            Dts.TaskResult = Dts.Results.Success
        Else
            Dts.TaskResult = Dts.Results.Failure
        End If
    End Sub

End Class

Your help would be greatly appreciated.

Ciao,
Colin.</description>
		<content:encoded><![CDATA[<p>Hi Zack,</p>
<p>Great post, thanks a lot. I&#8217;ve got a bit of an issue though and your help would be appreciated. </p>
<p>First question: I have quite a few XLS data sources, and even though I implemented this code SSIS Still moans that the Source file does not exist. Do you know how I get past this issue?</p>
<p>Second Question: I disabled the control flow for the portion of the package that gives an issue so that I could test the code, and the package the runs fine. The issue that I have is that even after setting a condition in the precedence constraint the Script task doesn&#8217;t seem to go and update the File Exists variable. I had to alter the code slightly to work with the variables that I already had.</p>
<p>The code as it currently looks can be found below:</p>
<p>Imports System<br />
Imports System.Data<br />
Imports System.Math<br />
Imports System.IO<br />
Imports Microsoft.SqlServer.Dts.Runtime</p>
<p>Public Class ScriptMain</p>
<p>    &#8216;   DATE:       12 August 2008<br />
    &#8216;   AUTHOR:     Colin Macguire<br />
    &#8216;   OTHER INFO: Code sourced from <a href="http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/" rel="nofollow">http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/</a></p>
<p>    Public Sub Main()<br />
        Dim fileLoc, fileName As String<br />
        If Dts.Variables.Contains(&#8220;User::Var_Source_Path&#8221;) = True AndAlso _<br />
        Dts.Variables.Contains(&#8220;User::Var_Source_Name&#8221;) = True Then<br />
            fileLoc = CStr(Dts.Variables(&#8220;User::Var_Source_Path&#8221;).Value)<br />
            fileName = CStr(Dts.Variables.Item(&#8220;User::Var_Source_Name&#8221;).Value)<br />
            &#8216;System.Windows.Forms.MessageBox.Show(&#8220;FileDir:&#8221; + fileLoc + &#8220;FileName:&#8221; + fileName)<br />
            If File.Exists(fileLoc + fileName) Then<br />
                Dts.Variables.Item(&#8220;User::Var_Source_Exists&#8221;).Value = True<br />
                &#8216;System.Windows.Forms.MessageBox.Show(”File exists”)<br />
            Else<br />
                Dts.Variables.Item(&#8220;User::Var_Source_Exists&#8221;).Value = False<br />
                &#8216;System.Windows.Forms.MessageBox.Show(”File not exists”)<br />
            End If<br />
            Dts.TaskResult = Dts.Results.Success<br />
        Else<br />
            Dts.TaskResult = Dts.Results.Failure<br />
        End If<br />
    End Sub</p>
<p>End Class</p>
<p>Your help would be greatly appreciated.</p>
<p>Ciao,<br />
Colin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: salnasi</title>
		<link>http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-78</link>
		<dc:creator>salnasi</dc:creator>
		<pubDate>Sat, 31 May 2008 17:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-78</guid>
		<description>Works great.  Wanted to know if I can tweak this to search the same directory for multiple files? 

Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Works great.  Wanted to know if I can tweak this to search the same directory for multiple files? </p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: narayanpavgi</title>
		<link>http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-76</link>
		<dc:creator>narayanpavgi</dc:creator>
		<pubDate>Tue, 05 Feb 2008 21:55:14 +0000</pubDate>
		<guid isPermaLink="false">http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-76</guid>
		<description>EXACTLY the post I was looking for. Nice, simple. Thank you.
(I wish you would enable anonymous posts - not for cowards - but for people like me who visit several useful blogs (like this one) through the day and wish to leave a grateful note).</description>
		<content:encoded><![CDATA[<p>EXACTLY the post I was looking for. Nice, simple. Thank you.<br />
(I wish you would enable anonymous posts &#8211; not for cowards &#8211; but for people like me who visit several useful blogs (like this one) through the day and wish to leave a grateful note).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: javaravyn</title>
		<link>http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-70</link>
		<dc:creator>javaravyn</dc:creator>
		<pubDate>Thu, 20 Dec 2007 17:46:23 +0000</pubDate>
		<guid isPermaLink="false">http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-70</guid>
		<description>Thanks this was exactly what I was looking for.  My issue is it keeps the red x out there saying &quot;The task is configured to pre-compile the script, but binary code is not found&quot;  do I need to set precompile to False?</description>
		<content:encoded><![CDATA[<p>Thanks this was exactly what I was looking for.  My issue is it keeps the red x out there saying &#8220;The task is configured to pre-compile the script, but binary code is not found&#8221;  do I need to set precompile to False?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aharuray</title>
		<link>http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-64</link>
		<dc:creator>aharuray</dc:creator>
		<pubDate>Tue, 24 Jul 2007 14:45:39 +0000</pubDate>
		<guid isPermaLink="false">http://dichotic.wordpress.com/2006/11/01/ssis-test-for-data-files-existence/#comment-64</guid>
		<description>Yup! It works now! You are the best!

Thanks for saving me loads of work..</description>
		<content:encoded><![CDATA[<p>Yup! It works now! You are the best!</p>
<p>Thanks for saving me loads of work..</p>
]]></content:encoded>
	</item>
</channel>
</rss>
