'BY Coo_boi If WScript.Arguments.Count=0 Then WScript.Quit Dim fso,txt,htm txt=WScript.Arguments(0) Set fso=CreateObject("Scripting.FileSystemObject") Set htm=fso.CreateTextFile(txt&".htm",True) title=fso.GetFile(txt).Name title=Left(title,Len(title)-4) MsgBox title htm.WriteLine "<html>" htm.WriteLine "<head>" htm.WriteLine "<title>"&title&"</title>" htm.WriteLine "</head>" htm.WriteLine "<body>" htm.WriteLine "<h1 align=center>"&title&"</h1>" htm.WriteLine "<hr color=red>" For Each line In Split(fso.OpenTextFile(txt).ReadAll ,vbCrLf) htm.WriteLine line&"<br>" Next htm.WriteLine "</body>" htm.WriteLine "</html>" htm.Close WScript.Echo "将txt转换为html成功"