Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
pazzy11
Posting Yak Master
145 Posts |
Posted - 2008-02-06 : 03:35:43
|
I have just migrated a DTS 2000 package as an SSIS package.one of the features that failed to migrate, was a transformationthat , selected 2 colums of data with a stored procedure,file name, and full path of filename, Then the file name only was written to a txt file,Then there was an ActiveX transformation task that used the other column (full file path) to copy said file to another location (specified as a global str variable eg \\127.0.0.1\directory\..etc)Now my question is this, with SSIS script task can i save the path name (2nd column) to a variable and then using this variable copy the file to another location (global str variable) ? Is there a [CODE] CopyFile [/CODE] function like there is in ActiveX ?And can i add this script task along with the DATA FLOW ? because if i add it outside the DF , it will only (im assuming) copy the last line (path) into the variable... |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-02-06 : 09:03:20
|
Please dont try migrating DTS to SSIS packages. We had tried a few and got screwed up! |
 |
|
Qualis
Posting Yak Master
145 Posts |
Posted - 2008-02-06 : 15:41:01
|
Ok, so I understand. You are writing one column of data to a Flat File destination and one column you want to use to copy files? This is easily done using a Script Component in your DataFlow. Select your column with the file name in the Input Columns section and then in the Script section, put the destination variable in the ReadOnlyVariables box. Then in your script, do something like: FileSystem.FileCopy(Row.name, Variables.FileName) Where "name" is the filename from the Input Columns and "FileName" is the variable name for the destination that you put in the ReadOnlyVariables box. |
 |
|
|
|
|
|
|