Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Unicode conversions with FileSystemObject
; Read ascii textfile, write back as unicode. ; Read unicode, write back as ascii. testfile = "d:\temp\test.txt" ; asciifile must exist objFSO = ObjectOpen("Scripting.FileSystemObject") objFile = objFSO.GetFile(testfile) objStream = objFile.OpenAsTextStream(1,0) ; read ascii Buffer = objStream.Readall() ObjectClose(objStream) objStream = objFile.OpenAsTextStream(2,-1) ; write unicode objStream.Write(Buffer) ObjectClose(objStream) ObjectClose(objFile) ObjectClose(objFSO) runzoomwait(StrCat(DirHome(),"browser.exe"),testfile) objFSO = ObjectOpen("Scripting.FileSystemObject") objFile = objFSO.GetFile(testfile) objStream = objFile.OpenAsTextStream(1,-1) ; read unicode Buffer = objStream.Readall() ObjectClose(objStream) objStream = objFile.OpenAsTextStream(2,0) ; write ascii objStream.Write(Buffer) ObjectClose(objStream) ObjectClose(objFile) ObjectClose(objFSO) runzoomwait(StrCat(DirHome(),"browser.exe"),testfile) exit Detlev Dalitz DD.20020704.2319
Article ID: W15591
File Created: 2003:05:13:11:29:08
Last Updated: 2003:05:13:11:29:08