Option Explicit dim oFSO, sPath, oFldr, oFiles, sFile, WshShell, Return , sExtension, sFind, sReplace dim TakeBackup, BackupExtension, NO_Messages '************************************************************************************** ' Setup parameters Below to perform a find and replace across multiple files ' ALL Files must be in the same directory '*************************************************************************************** sPath = "C:\bobTest\" sExtension = UCase("DTSCONFIG") sFind = "Data Source=vdevsql01,40050" sReplace = "Data Source=vdevELMS,40215" TakeBackup = "True" BackupExtension = ".Original" NO_Messages = "True" '*************************** ' DONE SETTING Parameters '*************************** set oFSO = CreateObject("Scripting.FileSystemObject") set oFldr = oFSO.GetFolder(sPath) set oFiles = oFldr.Files For each sFile in oFiles If RIGHT(UCASE(sFile.Path),LEN(sExtension)+1) = "." & sExtension Then 'msgbox(sFile.Name) Set WshShell = WScript.CreateObject("WScript.Shell") Return = WshShell.Run("replace.vbs " & chr(34) & sFind & chr(34) & " " & chr(34) & sReplace & chr(34) & " " & chr(34) & sPath & sFile.Name & chr(34) & " " & NO_Messages & " " & TakeBackup & " " & BackupExtension, 1, true) End If 'WshShell.Run "%windir%\messagebox.vbs" 'msgbox("replace.vbs " & ".htm .aspx " & chr(34) & sPath & sFile.Name & chr(34) & " True") Set wshshell = Nothing Next set oFSO = Nothing set oFldr = Nothing set oFiles = Nothing 'msgbox("done")