title: VBA search for a specific subfolder in many folders and move all the files in it
body: <p>can you help me?</p>
  
  <p>i want a macro vba that search for a <strong>SPECIFIC</strong> subfolder for example (Xfolder) between all the folders and subfolders that exist and move their files.</p>
  
  <pre><code>P:\Desktop\Folder1\subfolder\SUBFOLDER1\Xfolder
  </code></pre>
  
  <p>I'm using the VBA Scripting Runtime objects</p>
  
  <pre><code>  Set  oSourceFolder = fso.GetFolder(source)
  
      If Dir(destinationFolder, 16) = "" Then MkDir (destinationFolder)
          For Each oFile In oFolder.Files
                  If Dir(destinationFolder,16) = "" Then
                      fso.MoveFile oFile.Path, destinationFolder 
                  End If
  
              Next oFile
                             fso.DeleteFolder oFolder.Path
  
       Next oFolder
  </code></pre>