title: Extract SubString from the File Name SSIS Expression
body: <p>I have a criteria where I need to extract Year from the File Name</p>
  
  <p>The File name will be in following way</p>
  
  <pre><code>FILE.TEST.ASSGN_2012_Retro_Year   Result should be 2012
  FILE.TEST.ASSGN_2013_Retro_Year   Result should be 2013
  FILE.TEST.ASSGN_2014_Retro_Year   Result should be 2014
  </code></pre>
  
  <p>I am extracting the file name to the Variable called as FileName</p>
  
  <p>I tried below expression in derived column but no luck:</p>
  
  <pre><code>SUBSTRING(@[User::FileName], FINDSTRING(@[User::RealFileName], "HASSN_",1,4))
  </code></pre>