'------------------------------------------------------------------------ ' Copyright (C) 2001 Marios Polyzoes '------------------------------------------------------------------------ 'SN: 011023 L_Welcome_MsgBox_Message_Text = "This script removes the dublicated names in a list" L_Welcome_MsgBox_Title_Text = "Utility by Marios Polyzoes. marpoly@geo.(gr)" Call Welcome() ' ******************************************************************************** Dim WSHShell, fso, f, ts, strdns, done, MyFile, fldr, redf, pso, statf, plits Set WSHShell = WScript.CreateObject("WScript.Shell") strdns = "x" '------------------------------------------------ const pth = "./" plits = "tipota" '----------------------------------------------- Set fso = CreateObject("Scripting.FileSystemObject") fso.CreateTextFile ("magazines.txt") Set f = fso.GetFile("magazines.txt") Set ts = f.OpenAsTextStream(ForWriting, TristateUseDefault) '----------------- Const ForReading = 1, ForWriting = 2, ForAppending = 8 Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0 Set fso = CreateObject("Scripting.FileSystemObject") Set redf = fso.OpenTextFile("mag.txt", ForReading) Do While redf.AtEndOfLine <> True strdns = redf.ReadLine if strdns > "" then If strdns <> plits Then ts.WriteLine strdns plits = strdns End If done = "ok" End if 'DefResp = MsgBox ("Το " & strdns & ".com domain?", vbYesNo) Loop ts.Close WScript.Echo "The work is done. Thanks!" ' ******************************************************************************** ' * ' * Welcome ' * Sub Welcome() Dim intDoIt intDoIt = MsgBox(L_Welcome_MsgBox_Message_Text, _ vbOKCancel + vbInformation, _ L_Welcome_MsgBox_Title_Text ) If intDoIt = vbCancel Then WScript.Quit End If End Sub