title: Moving files to a subfolder based on partial filename in VBA without using FSO
body: <p>This code is run from a macro-enabled workbook. It checks if there is already any files in the same folder as the workbook which names start with &quot;repositorio nóminas&quot; and moves them to a subfolder.</p>
  <p>It uses the method &quot;Name _ As _&quot; to move them, but the &quot;* . *&quot; argument does not seem to work in this context. How can I check for partial name while using the &quot;Name _ As _&quot; method?</p>
  <pre><code>Dim wb      As Workbook  
  Dim path    As String
  
  Set wb = ActiveWorkbook    
  path = wb.path &amp; &quot;\&quot;
  
  If path &amp; &quot;\repositorio&quot; &amp; &quot;*.*&quot; = True Then            !!!Error 13 Type Mismatch!!!
      Name path &amp; &quot;\repositorio&quot; &amp; &quot;*.*&quot; As path &amp; &quot;backups\&quot; &amp; &quot;\repositorio&quot; &amp; &quot;*.*&quot;
  End If
  </code></pre>
  <p>For clarification, I got the idea of trying the &quot;* . *&quot; argument from this piece of code I had found in the past, where it uses &quot;path&quot; and the argument to find anything that exists in that path.</p>
  <pre><code>str = Dir(path &amp; &quot;*.*&quot;)
  
  Do While str &lt;&gt; &quot;&quot;
      ctr = ctr + 1
      str = Dir
   Loop
  </code></pre>