Set objArgs = WScript.Arguments
If objArgs.Count > 0 Then
For I = 0 to objArgs.Count - 1
vrRcpChmFchOuDoss = (objArgs(I))
Next
st = vrRcpChmFchOuDoss
stExt = Right(st,3)
i = InStrRev (st,"\")
vrNomFchSlctn = Mid(st,i+1)
Else
Set oUA = CreateObject("UserAccounts.CommonDialog")
x = oUA.ShowOpen
vrRcpChmFchOuDoss = (oUA.FileName)
End if
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objSourceFile = objFSO.OpenTextFile(vrRcpChmFchOuDoss, 1) ' Fichier source
Set WshNetwork = WScript.CreateObject("WScript.Network")
Const ForReading = 1, ForWriting = 2
Set FichierTXT = WScript.CreateObject("WScript.Shell")
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("sortie.txt", ForWriting,true) ' Fichier de sortie
Do Until objSourceFile.AtEndOfStream
vrLigne = objSourceFile.ReadLine
vrLigne = Replace(vrLigne,","")
f.writeline("f.writeline(""" & vrLigne & """)")
Loop
objSourceFile.Close
f.close
Partager