I want a batch code that would convert my list of text files already saved as unicode to ANSI Type.
Any help on this is much appreciated.
Also, I thought a way could be to open the unicode text file and write it to an Ansi text file type, howere not sure if this is the right well because I do have
a list of text files, i want to convert to Ansi text file type.
See the code below, it isn't giving me my result though....
echo off
$file = FileOpen("C:\Examplle.text", 0) ; Open for Reading
$file1 = FileOpen("C:\Example.text", 1) ; Open for Writing
If $file = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
If $file1 = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
While 1
$chars = FileRead($file, 2)
If @error = -1 Then ExitLoop
If ($chars) <> "ÿþ" then
FileWrite ($file1 , StringLeft ($chars , 1))
EndIf
Wend
FileClose($file)
FileClose($file1)
Many Thanks