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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
tableau = array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
' ou Dim Tableau(100) ??
i=0
Dim OFS, oLigne
Dim bLigne1lue
Dim sLigne
Const ForReading = 1, ForWriting = 2
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFlu = oFSO.OpenTextFile("c:/fichier1.txt", ForReading)
bLigne1lue = False
Do While Not oFlu.AtEndOfStream
sLigne = oFlu.ReadLine
If not sLigne="0" then
if not bLigne1lue then
envoie_message(sLigne)
bLigne1lue=True
else
' Récupère les autres lignes
tableau(i)=sLigne
i=i+1
end if
Else
tableau(0)=""
End If
Loop
oFlu.close
Set oFec = oFSO.OpenTextFile("c:/fichier1.txt", ForWriting,true)
for a=0 to i
oFec.WriteLine (tableau(a))
next
oFec.close |
Partager