title: Rename file with VBA Name function not working properly
body: <p>I'm preparing a code which would every month help users rename specific string in multiple files.</p>
  
  <p>Example: from "Jan" to "Feb", from "Bank" to "Cash", from "Test" to "Sharp" etc. (Bank Statement Jan.xls -> JPM Statement Jan.xls, Form test.xls -> Form sharp.xls, etc.)</p>
  
  <p>I use a function to populate files from all folders and also subfolder picked up a <code>FileDialog</code>, then I prompt the user to <code>InputBox</code> string to be found and string to be replaced in the file name.</p>
  
  <pre><code>Sub testrenametest()
  
      Dim filedlg As FileDialog 
      Dim xPath As String 
      Dim fileList As Object 
      Dim vFile As Variant 
      Dim FindTerm As String, ReplaceTerm As String, NewFileName As String
  
      Set filedlg = Application.FileDialog(msoFileDialogFolderPicker)
      With filedlg
          .Title = "Please select folder"
          .InitialFileName = ThisWorkbook.Path
          If .Show &lt;&gt; -1 Then End
          xPath = .SelectedItems(1) &amp; "\"
      End With
  
      FindTerm = InputBox("Find string:") ReplaceTerm = InputBox("Replace with:")
  
      Set fileList = getFileList(xPath)
      For Each vFile In fileList
          If vFile Like "*" &amp; FindTerm &amp; "*" Then
                  NewFileName = Replace(vFile, FindTerm, ReplaceTerm)
                  Name vFile As NewFileName
          End If
      Next vFile 
  End Sub
  </code></pre>
  
  <pre><code>Function getFileList(Path As String, Optional FileFilter As String = "*.*", Optional fso As Object, Optional list As Object) As Object
  
      Dim BaseFolder As Object, oFile As Object
  
      If fso Is Nothing Then
          Set fso = CreateObject("Scripting.FileSystemObject")
          Set list = CreateObject("System.Collections.ArrayList")
      End If
  
      If Not Right(Path, 1) = "\" Then Path = Path &amp; "\"
      If Len(Dir(Path, vbDirectory)) = 0 Then
          MsgBox "You need to browse folder first!"
          End
      End If
  
      Set BaseFolder = fso.GetFolder(Path)
      For Each oFile In BaseFolder.SubFolders
          getFileList oFile.Path, FileFilter, fso, list
      Next
  
      For Each oFile In BaseFolder.Files
          If oFile.Path Like FileFilter Then list.Add oFile.Path
      Next
  
      Set getFileList = list
  End Function
  </code></pre>
  
  <hr>
  
  <p>It works for some strings like month names but for instance for "test" or "bank" doesn't. It says <code>Run-time error 53 File not found</code> on line Name vFile As NewFileName, but the file exists. Sorry for inputting the whole code, but I am unable to pinpoint where might be a problem.</p>