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 |
sarahmfr
Posting Yak Master
214 Posts |
Posted - 2011-07-29 : 00:51:48
|
I am new to script tasks in ssisI have a list of files in a directory.I want to go through the files and search for the following wordsword1,word2,word3 inside the fileif the file has the word word1 i want to move it to a folder named word1 if the file has the word word2 i want ot move it to folder named word2How can I do that using ssisThanks in advancesarah |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-07-29 : 02:41:22
|
you need to use foreachloop for looping through the filesyou need to add a script task inside for each loop to open file and read contents. based on what word it has you need to set value of ssis variable created with word1 or word2 or word3. then add a file system task for copy file and give destination folder name as above variable name.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
sarahmfr
Posting Yak Master
214 Posts |
Posted - 2011-07-30 : 16:30:54
|
Thanks I will try that |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-07-31 : 01:48:16
|
good luck. post back if you face any problem------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|