Copy File Operation in SSIS.
Hello Everyone., I am trying to do a file copy operation from one directory to other through ssis. destination and source directories are rows in a table. Is there any control flow that can help in accomplishing this task. I know File system can copy the files but the way I want is it should dynamically read the destination file path from the table and also read the source file path from the table and do the copy operation. I am thinking of using for each container and use variables set the destination and source filepaths but I am not quite sure if that would help me accomplish in what I am trying to do. Also, as it copies each file, I would also like to update a column in the table, saying whether the copy was successful or not. If anyone could shred some light, it would help a lot. Thank you in advance. Please mark as 'Answer', if the solution solves your problem.
August 5th, 2012 12:52am

Use a SQL task to retrive the SourceFilepath and DestinationFilepath in to two parameters..(Create a stored proc) Thn in file system task..choose Sourcefileconnection and Destinationfileconnection from variable option and provide the variable names there. Once the FileSystemTask is completed.. Use SQL task again to updated the values(Create a stored proc).. (or) Read all the table data into a object type variable(Execute SQL task ,Full result set) , then use foreachloop container (use ado.net rowset schema enumarator) and assign the column values to parameters ,pass that parameters to FileSystemTask..
Free Windows Admin Tool Kit Click here and download it now
August 5th, 2012 1:14am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics