This won't go through your entire hard drive, just the sub assemblies within the one you have open.
Also, I'm not an iLogic expert and I've only very basically tested this so try it on something you don't mind making a mess of, or at least do an iLogic design Copy on an assembly first to try it out.
You just need to copy and paste the code into a new rule in your iLogic pallet.
Then change these two lines. The first is just the file name of the part you want to remove, the second is the full path and file name of the part you want to put in. N.B. your new part, you say has a different number of holes, you have to have modelled this from the old part and changed the number of holes or your constraints are going to break.
These are the lines you need to change:

Good luck!!!
Class this rule
Dim oOld As String = "xxx.ipt" 'Replace xxxxxx with the file name of part to replace
Dim oNew As String = "C:\xxxxxxx.ipt" 'replace xxx with full path, name and .ipt on the end of the file you want to use instead
Dim oOcname As String
Sub Main
If ThisApplication.ActiveDocumentType <> kAssemblyDocumentObject Then MessageBox.Show("This rule is designed to only work in assembly documents.", "Wrong Document Type") : Exit Sub
Dim parentDoc As AssemblyDocument = ThisApplication.ActiveDocument
'Do anything unique to main assembly
Call AssemblyRunner(parentDoc)
End Sub
Sub AssemblyRunner(aDoc As AssemblyDocument)
'Do things to the assembly file if any
'MessageBox.Show(aDoc.DisplayName, "Assembly:")
'Start Looping
For Each oOcc As ComponentOccurrence In aDoc.ComponentDefinition.Occurrences
If oOcc.DefinitionDocumentType = kAssemblyDocumentObject
Call AssemblyRunner(oOcc.Definition.Document)
Else If oOcc.DefinitionDocumentType = kPartDocumentObject
oOcname = oOcc.Name
Call PartRunner(oOcc.Definition.Document, aDoc)
End If
Next
End Sub
Sub PartRunner(pDoc As PartDocument, parent As AssemblyDocument)
If pDoc.DisplayName = oOld
Component.Replace(oOcname, oNew, True)
End If
End Sub
End Class
'loop code borrowed from JCamper

Inventor Certified Professional