Tuesday, 3 February 2015

SSIS Dynamically Archive XML Files



I am trying to archive a bunch of XML files, one by one, using a Foreach Loop. The files Doesn't exist in the source folder, but are downloaded from FTP to the source folder on the same Foreach Loop. The problem is that in the file system task i have to give a source connection. In order for the connection to point each time to a different file name i built it as an expression - "C:\ODS_Files\Customer\For_Load\"+ @[User::Current_File_Name] The variable @[User::Current_File_Name] is mapped in the Foreach loop so that every loop it holds a different file name.


Because the files doesn't exist in the source folder at first, when i try to execute the package i get an error message that the file specified by the path in the expression is not found in that path.


I searched online but didn't find anything that can help me work around it. If someone have a suggestion i'll be more than happy to hear it... Thanks...Udi


No comments:

Post a Comment