VBS : lire ligne par ligne un fichier txt [Résolu]
tsotb19
Messages postés jeudi 18 décembre 2003Date d'inscription
22 juillet 2005
Dernière intervention
-
20 juin 2005 à 10:40 - Dernière réponse : cs_sweetyrahma6
Messages postés lundi 15 décembre 2008Date d'inscription
7 septembre 2009
Dernière intervention
- 3 sept. 2009 à 11:58
cs_wape262
Messages postés samedi 21 décembre 2002Date d'inscription
19 décembre 2010
Dernière intervention -20 juin 2005 à 20:21
-1
Utile
Bonjour,
Tu peux utiliser le FileSytemObject :
Set Fso = CreateObject("Scripting.FileSystemObject")
Set Txt = Fso.OpenTextFile("C:\MonFichier.txt", 1)
Do While Not Txt.AtEndOfStream
sLine = Txt.ReadLine
WScript.Echo sLine
Loop
Txt.Close
Set Txt = Nothing
Set Fso = Nothing