All,

Good afternoon. I have hundreds of pdf files with "Model (1)" as part of filename that I would like stripped off, i.e. Y-45E-0372 Model (1).pdf I have tried following code but to no avail (Error: Expected end of statement). Would someone be so kind to take a look at code and see what is wrong? I sure would appreciate it.

Dim strFolder As String
Dim strFile As String

strFolder = "C:\Dave"
strFile = Dir(strFolder & "\*.*")
Do While Len(strFile) > 0
If InStr(strFile, "Model (1)") > 0 Then
Name strFolder & strFile As strFolder & Replace(strFile, "Model (1), "")
End If
strFile = Dir()
Loop

Thank you,
David