The column File_Name contains the name of the files stored in a source file path. And File_Details stores the same File Name in the format
<name>_YYYYMMDD_HHMISS.<extn>. I have an Execute SQL Task that will store the Full ResultSet from the Attachment table in an object variable. After that, the package should check in the source file path for the files
returned from the Exceute SQL Task.

For e.g.: if in the source file path, if there are files with the same name as given in the File_Name column, then it should move all those files to a destination file path. In the destination path, the file names should be having the name as given in File_Details
column.

i.e if abc.xlsx, xyz.pdf, 123.xlsx are there in the source file path, they should be moved to a destination file path with the names abc_20121121_150142.xlsx, abc_20121121_150142.pdf, 123_20121121_150142.xlsx respectively.

The approach I have taken is explained below:

1. Execute SQL Task to get the File_Name and File_Details and store in an object variable called varFile

Answers

The SSIS expression that would drive the split could the FINDSTRING function based where you search for the 1st occurrence of one string in another, of the result is positive then it branches to once side, otherwise another in the very ForEach Loop.

The SSIS expression that would drive the split could the FINDSTRING function based where you search for the 1st occurrence of one string in another, of the result is positive then it branches to once side, otherwise another in the very ForEach Loop.