I'm after little help again here :/
What I'm trying to do is to loop folder from temp location and check against main location folders, if it match copy over to main location. I managed to get working code, if there is no folder in main location or it's an exact match.
What i would like to get is to copy folder on folder name partial match.
For example :
tmpFolder\123 to mainFolder\ABC_123
Private Sub btn_Move_Click()
Dim DirNameFrom As String
Dim PathNameFrom As String
Dim PathNameTo As String
PathNameFrom = "W:\Absence Database\Absence_BE\HRMove\"
DirNameFrom = Dir(PathNameFrom, vbDirectory)
Do While DirNameFrom <> ""
If GetAttr(PathNameFrom & DirNameFrom) = vbDirectory And DirNameFrom <> "." And DirNameFrom <> ".." Then
PathNameTo = "W:\Absence Database\Absence_BE\To\"
fso.CopyFolder PathNameFrom & DirNameFrom, PathNameTo & DirNameFrom, True
DirNameFrom = Dir()
Hope that makes sense.