Bonjour,

j'effectue une recherche dans un fichier afin de remplacer une chaine mais je voudrais qu'il ignore la casse ( a la place de replace)
ci joint mon prog
merci pour votre aide
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Const ForReading = 1, ForWriting = 2, ForAppending = 8
 
Dim WshShell1, SUserProfile
Set WshShell1 = CreateObject("Wscript.Shell")
sUserProfile = WshShell1.ExpandEnvironmentStrings("%USERPROFILE%")
fichier2 = sUserProfile&"\Application Data\ICAClient\PN.INI"
fichier1 = sUserProfile&"\Application Data\ICAClient\APPSRV.INI"
 
 
MsgBox "domain :" &domaineold
 
Dim fso, f, st
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(fichier2, ForReading)
st = f.readAll
 
f.Close
Set f = fso.OpenTextFile(fichier2, ForWriting)
f.Write (replace(replace(st,"Domain=siege_dev","Domain=NORIAP")))
f.close