Sub MOVEFILES()
Dim uFiles As Object: Set uFiles = CreateObject("Scripting.FileSystemObject")
Dim uFolders As Object: Set uFolders = CreateObject("Scripting.FileSystemObject")
Dim uFilePath As String: uFilePath = "C:\Users\UserName\Desktop\User Files"
Dim uFolderPath As String: uFolderPath = "C:\Users\UserName\Desktop\User Folders"
Dim ufol As Object, ufil As Object, fil As Object
Set ufil = uFiles.getfolder(uFilePath)
Set ufol = uFiles.getfolder(uFolderPath)
For Each fil In ufil.Files
GetMatch ufol, fil
Next fil
End Sub
Sub GetMatch(fol As Object, fil As Object)
Dim f As Object
For Each f In fol.subFolders
If Split(f.Name, " ")(0) = Split(fil.Name, " ")(0) Then
Name fil.Path As Join(Array(f.Path, fil.Name), "\")
Exit Sub
End If
Next f
End Sub