用JS写个脚本,操作一个文本文件,把文本文件里面的重复行去掉,输出到另一个文本!!最好是自己运行过的!!
再献上用VBS写好的一个脚本,供各位大大参考
-----------------------------------------------------------------------
Set Fso = CreateObject("Scripting.FileSystemObject")
Set File = Fso.OpenTextFile("c:\test.txt",1)
AllLine = File.ReadAll()
arrAllLine = Split(AllLine,vbCrlf)
For index = 0 To UBound(arrAllLine)-1
tmp1 = arrAllLine(index)
If tmp1"" Then
For index2 = index+1 To UBound(arrAllLine)-1
'wscript.echo index2
If StrComp(tmp1,arrAllLine(index2),1)=0 Then
arrAllLine(index2)=""
'wscript.echo arrAllLine(index2)
end if
Next
Wscript.Echo tmp1
End If
Next