See if this gets you started:
Sub CopyFiles()
    Dim strFolder As String, strFile As String, strPrefix As String
    Dim colFiles As New Collection, varItem As Variant, fso As FileSystemObject
    Set fso = CreateObject("scripting.filesystemobject")
    strFolder = "C:\folderpath"
    strFile = Dir(strFolder & "\*.*")
    Do While strFile <> vbNullString
        If strPrefix <> Left(strFile, 12) Then
            strPrefix = Left(strFile, 12)
            colFiles.Add strPrefix
        End If
        strFile = Dir
    Loop
    For Each varItem In colFiles
        If Dir(strFolder & "\" & varItem) = "" Then MkDir strFolder & "\" & varItem
        fso.CopyFile strFolder & "\" & varItem & "*", strFolder & "\" & varItem
    Next
End Sub