• Hi Unnati, see below.

    1) Have a SQL Function to validate the file name. Make sure the sql function returns either 0 or 1 upon failure or success.

    2) Pass the file name you are getting through the loop to the sql function using a Execute sql task.

    3) If the return value is 0, do nothing but if its 1 add whatever task you want to do with that file. I would assume a Data flow task.

    4) Using precedence constraints, check the variable to pass the values to the next tasks.

    another method, not a great one though.

    Have all file names into a sql table and preprocess them with the same function and keep only ones you want to use. Rest you can delete from the table and use the file names that are needed only directly.

    Good Luck 🙂 .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.