title: SSIS Foreach loop, send email if no file is present?
body: <p>I have a very simple SSIS package that grabs 1 or more flat files and imports the data into a SQL Server 2012 table, then a separate package archives the file..  The packages work perfectly, but I want it to warn me if there is no file present when it starts. </p>
  
  <p>I know that the Foreach loop generates a warning when there are no files:</p>
  
  <p><code>Warning: The For Each File enumerator is empty. The For Each File enumerator did not find any files that matched the file pattern, or the specified directory was empty.</code></p>
  
  <p>I have not been able to find a way to use that warning to trigger an email, as it does not cause the package to fail, and I am not sure if there is a constraint or expression that can trigger a next step based on a warning.</p>
  
  <p>I use the for each loop to populate a variable <code>@[User::FileName]</code> with any filename matching the pattern which is preset.</p>
  
  <p>A notify operator task with the expression <code>@[User::FileName]==""</code> and completion or success fires no matter what, if there is a file or not.</p>
  
  <p>Is this possible in SSIS?</p>