Dim objFSO
Dim strInput
Dim strSearch1
Dim strSearch2
Dim strReplace1
Dim strReplace2
strSearch1 = "parttículas"
strSearch2 = "../../"
strReplace1 ="partículas"
strReplace2 = "../../"

Set objFSO = CreateObject("scripting.filesystemobject")

strInput = InputBox("Escribe la carpeta a partir de la cual buscar:") 
If objFSO.FolderExists(strInput) Then
	CheckFolder objFSO.getfolder(strInput)
	MsgBox "Script terminado"
Else
	MsgBox "La carpeta " & strInput & " no existe. Vuelve a intentarlo "
End If


Sub CheckFolder(objCurrentFolder)
    
    Dim strTemp
    Dim objNewFolder
    Dim objFile
    Dim intPrompt
       
       For Each objFile In objCurrentFolder.Files
	       Set f = objFSO.OpenTextFile(CStr(objFile.Path), 1)
   		   strTemp =   f.ReadAll
		   If ((InStr(strTemp, strSearch1) > 0) And (InStr(strTemp, strSearch2) > 0)) Then		   	
           		intPrompt = MsgBox("El archivo " & vbCr & CStr(objFile.Path) & vbCr & "contiene '" & strSearch1 & "' y '" & strSearch2 & "'. " & vbCr & "¿Deseas reemplazarlos por '" & strReplace1 & "' y '" & strReplace2 & "'?", 1) 
           		If intPrompt = 1 Then
           			Set f = objFSO.OpenTextFile(CStr(objFile.Path), 2)
           			strTemp = Replace(strTemp, strSearch1, strReplace1)
           			strTemp = Replace(strTemp, strSearch2, strReplace2)
           			f.Write strTemp
           		End If
			End If
       Next

       For Each objNewFolder In objCurrentFolder.subFolders
               CheckFolder objNewFolder
       Next
End Sub