|
Const ForReading = 1 Const ForWriting = 2
Set objDictionary = CreateObject("Scripting.Dictionary")
Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile _ ("c:\scripts\namelist.txt", ForReading)
Do Until objFile.AtEndOfStream strName = objFile.ReadLine If Not objDictionary.Exists(strName) Then objDictionary.Add strName, strName End If Loop
objFile.Close
Set objFile = objFSO.OpenTextFile _ ("c:\scripts\namelist.txt", ForWriting)
For Each strKey in objDictionary.Keys objFile.WriteLine strKey Next
objFile.Close
Proposer un script
|
Notre avis :

Votre avis :

Réactions : 0
Votants : 1
Visites : 10526
|