I need to read a text file and copy in other file, but some line contains ASCII non-printable code as NUL
, ETX
, SOH
, etc.
I use ReadLine
in this code to copy file and all lines are copyed, but not ASCII line. There is a way to copy also that line?
Set file = fso.GetFile(FileNameIn)
Set OutFile = fso.CreateTextFile(FileNameOut, True)
Set ts = file.OpenAsTextStream(1, -2)
Do Until ts.AtEndOfStream
strLine = ts.ReadLine
OutFile.WriteLine(strLine)
Loop