清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | Dim objFSO,objFile,DataList,strText Const adVarChar = 200 Const MaxCharacters = 255 Const ForReading = 1 Const ForWriting = 2 Set DataList = CreateObject( "ADOR.Recordset" ) DataList.Fields.Append "ComputerName" , adVarChar, MaxCharacters DataList.Open Set objFSO = CreateObject( "Scripting.FileSystemObject" ) Set objFile = objFSO.OpenTextFile( "C:ScriptsComputers.txt" , ForReading) Do Until objFile.AtEndOfStream strLine = objFile.ReadLine DataList.AddNew DataList( "ComputerName" ) = strLine DataList.Update Loop objFile.Close DataList.Sort = "ComputerName" DataList.MoveFirst Do Until DataList.EOF strText = strText & DataList.Fields.Item( "ComputerName" ) & vbCrLf DataList.MoveNext Loop Set objFile = objFSO.OpenTextFile( "C:ScriptsComputers.txt" , ForWriting) objFile.WriteLine strText objFile.Close |