wb2 is the workbook name of what you call file 2 and that this workbook is open.
It assumes that the value (in your example 12347AB) is in cell A1 of wb2.
It also assumes that the sheets are named "Sheet1" in both workbooks.
I did a very limited test but you better do a comprehensive test in a copy of your workbook.
Sub With_AutoFilter()
Dim a As String
Dim wb2 As Workbook
Set wb2 = Workbooks("TempBook.xlsm") '<-----Change Workbook Name
a = wb2.Sheets("Sheet1").Range("A1").Value '<-----Change Cell Reference
With Sheets("Sheet1").Range("A1:A" & Cells(Rows.Count, 1).End(xlUp).Row)
.AutoFilter 1, "<>*" & a & "*"
End With
Range("A2:A" & Cells(Rows.Count, 1).End(xlUp).Row).SpecialCells(12).EntireRow.Delete
ActiveSheet.AutoFilterMode = False
End Sub