I have .dat FIle. I need to do some encoding on this file and need o save into a .txt file I am using script component in SSIS.
I have used SSIS Script component to impement this .
//have declared 2 read write variable FIleLoc and FileWrite
string fileIn = Variables.FileLoc;
string fileOut = Variables.FileWrite;
var x = System.IO.File.ReadAllText(fileIn);
byte[] encodedBytes = System.Text.Encoding.UTF8.GetBytes(x);
byte[] unicodeBytes=
Encoding.Convert(Encoding.UTF8,Encoding.Unicode,encodedBytes);
System.IO.File.WriteAllBytes(fileOut, unicodeBytes);
Output0Buffer.Col = Variables.FileWrite;
When i try to debug the code its showing package executed successfully and the .txt file is not generated.