title: Using a variable to process all *.xml files using SSIS
body: <p>I am new to SSIS package, so any help would be really appreciated.
  The SSIS code was built using the VS2005 and its setup as a SQL agent Job in the 2005 SQL Server. Now as we are migrating to 2016 SQL server we see that the same SQL agent Job fails.
  Hence we decided to rebuild the package using VS2012, to see if that would solve the issue.</p>
  
  <p>Processes done on the Control Flow Tab:
  <a href="https://i.stack.imgur.com/4PRmV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4PRmV.png" alt="enter image description here"></a></p>
  
  <p>Data Flow task:
  <a href="https://i.stack.imgur.com/gZlJB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gZlJB.png" alt="enter image description here"></a></p>
  
  <p>Variables used:
  <a href="https://i.stack.imgur.com/uJ9pV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uJ9pV.png" alt="enter image description here"></a></p>
  
  <p>we have used a ForEachLoop:
  <a href="https://i.stack.imgur.com/x5ezK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x5ezK.png" alt="enter image description here"></a></p>
  
  <p>Errors Show in the Data Flow Task:
  <a href="https://i.stack.imgur.com/ChQa1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ChQa1.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/EaLKO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EaLKO.png" alt="enter image description here"></a></p>
  
  <p>We are still not able to make out what's causing the issue, we also refereed the full step by step process given in the below link.</p>
  
  <p>Click <a href="https://stackoverflow.com/questions/6956409/ssis-reading-multiple-xml-files-from-folder" title="https://stackoverflow.com/questions/6956409/ssis-reading-multiple-xml-files-from-folder">here</a>!</p>
  
  <p>If any more information is required I can provide that too!!</p>
  
  <p>XML Source Editor Error:
  <a href="https://i.stack.imgur.com/pnXjl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pnXjl.png" alt="enter image description here"></a></p>
  
  <p>XML Source Advanced Editor:
  <a href="https://i.stack.imgur.com/KYF20.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KYF20.png" alt="enter image description here"></a></p>
  
  <p>XML Source Components Tab:
  <a href="https://i.stack.imgur.com/R8YvC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R8YvC.png" alt="enter image description here"></a> </p>
  
  <p>XML Source Connection manager tab:
  <a href="https://i.stack.imgur.com/X3hUm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X3hUm.png" alt="enter image description here"></a></p>