I used to transfer messages between Android and computer for data backup . like the text messages .contacts,videos ,images ,Transfer files between your computer & Android device - Nexus Help
How to Transfer Text Messages from Android to Computer
Read option 2.
Based on the mobile version and the size of the transmitted data ,maybe your data transfer scheme is for you not other people.I used to backup Android contacts on computer . as well as the text messages,videos ,images ,
It seems that Marshmallow users have to do some extra settings in order to connect to PC as MTP.
Go to Settings> About phone (> Software info), tap “Build number” 7-10 times. Back to Settings> Developer options, check “Select USB Configuration”, choose MTP.
More tips for Android USB not recognized problem