My script task is inside a for each loop. I want the script task to write some dynamic string to one file only for all iterations. After every iteration, the file should get appended, not overwritten with the current value of the dynamic string. Its like a logging "tool".
How do I do this ?
Here is the script which is inside my for each loop -
String text = "My text here";
String path = @"C:\Data\TextFiles\logFile.txt";
StreamWriter file = new StreamWriter(path, true);
file.WriteLine(text);
file.Close();