VBScript newline entfernen

Ich habe eine HTML-Seite mit einer oder mehr Zeilenumbrüche nach </html>. Mein VBScript-Datei ist in der Lage zu finden, die ersetzen Sie die Zeilenumbrüche mit der leere. Aber, es sieht aus wie OpenTextFile ist, indem ein Zeilenumbruch am Ende wieder. Hilfe!!!

'Pulled this from the InterWebs
Const ForReading = 1 Const ForWriting = 2
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("a.html", ForReading)
strText = objFile.ReadAll
'Wscript.Echo strText
objFile.Close

strNewText = Replace(strText, "</html>" & vbCrlf, "</html>")
Set objFile = objFSO.OpenTextFile("a.txt", ForWriting)
objFile.WriteLine strNewText
objFile.Close

InformationsquelleAutor publicRavi | 2011-02-17

Schreibe einen Kommentar