I need to convert a TXT file with UNIX encoding for Windows, I found a solution in Vba, but I can’t insert it in the code, could you help me?
'Delete last line
Dim lines As New List(Of String)(IO.File.ReadAllLines(LocalAppData & “\settings.txt”))
'Remove the line to delete, e.g.
lines.RemoveAt(lines.Count - 1)
IO.File.WriteAllLines(LocalAppData & “\settings.txt”, lines.ToArray())
Hello Israel,
you can try this. This sequence reads a text file and changes newline \n with return and newline \r\n. As far as I know is this the only difference between Unix and Windows style text files.
Best regards
Stefan