Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSIS to Copy File to Multiple Directories

Status
Not open for further replies.

thermidor

Programmer
Nov 28, 2001
123
US
Hi All -
I would like to use SSIS to:
1) Read the names of multiple subdirectories
2) Copy a single file to each subdirectory (Same file to different destinations).

Can anyone suggest how to approach this?

TIA,
Sven
 
I'd probably approach this using a script task - iterate through the subdirectories of a particular root folder (which could be stored as a variable), and then use something like System.IO.File.Copy to copy the file from its original location to each of the relevant subdirectories.

 
Why can't I use a foreach container with a file system task in it? My thinking is the foreach would read the destinations into a variable and the file system task would use the variable to copy the file to the destiantions. I tried this but it doesn't seem to work...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top