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
|
Const OpenFileForReading = 1
Const OpenFileForWriting = 2
dim FSO, text, readfile,Writefile, fic_Err, FichierErreur,contents,newContents,DteMED,NewDteMED,DteResil,NewDteResil,DteSUS,NewDteSUS,Cli,Ctr,DteDebut
Dim A_MED(),Index,A_Ctr,Trouve, I
Dim f, fc, f1, Rep_Destination, Fic_Copie, objMessage
Rep_Destination = "D:\Users\bidule\"
set FSO = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(getpath())
Set fc = f.Files
For Each f1 in fc
If left(f1.name,13) = "blabla" and lcase(right(f1.name,8)) <> "_new.txt" then
set readfile = FSO.OpenTextFile(getpath() & f1.name, OpenFileForReading, false)
set Writefile = FSO.OpenTextFile(getpath() & left(f1.name,len(f1.name)-4) & "_new.txt", OpenFileForWriting, true)
Index = 1
do while readfile.AtEndOfStream = false
contents = readfile.ReadLine
if right(ltrim(rtrim(Contents)),20) = "Mon Terme que je veux shooter" then
' * Nouvelles Lignes
newContents = ""
' et c'est ici que je sèche ... |
Partager