Mac Mail - move IMAP message to Exchange folder
I don't know what is causing the error, but I can tell you where on the filesystem you can find your messages. Perhaps you can move them manually in Finder?

The default location for mailboxes is:

~/Library/Mail/V2/

in Finder, choose Go To Folder from the GO menu or use the shortcut ⬆︎⌘G and paste that path into the dialog box.  That folder should contain folders for each of your mail accounts, each containing mailbox folders with labels like INBOX.mbox which are simply folders themselves. You'll likely have to traverse down several levels of folders with arbitrary names before you reach a Data folder containing a Messages folder which is where you will finally find your email messages. Hope that helps you out.