MS Outlook: .msg is not valid (Error Copying File or Folder)

I get the following message daily when I drag + drop emails from my MS Outlook account into a folder on the O:drive: The name RE_ Re_ xxxxxx_ xxxxxxxxx - xxxxxxxxxxxxxxx_ FedEx Label for Check _ Please Send (xxxxxxxx).msg is not valid.

The pop-up box states at the top: Error Copying File or Folder.

This happens with about 50% of the files that I drag + drop into my folders on the O:drive.
My current workaround for this is to drag + drop the MS Outlook email onto my desktop first, and then drag + drop it into my O:drive folder. So it takes me 2 steps to do this task, rather than 1.

Why do I get this .msg is not valid error message?
(I’d like to be able to drag + drop files in 1 step, rather than 2.)

I used “Xs” above to replace any names that I would like to keep private in this public forum.

Hi @giannetti,
My initial guess is that the path that you are dragging to is long enough that Outlook/Windows is having issues copying the file to it.

odrive is fully compatible with long paths (paths over 260 characters long), but many applications are not, including many Microsoft applications. Since odrive is compatible with long paths, it can successfully create very long paths on your computer when it syncs the remote data down. When you then try to perform operations from other applications (like Outlook) on these long paths, you can see these types of errors pop-up.

When you drag and drop files, odrive actually takes no part in that operation. The pop-up error message you are receiving is likely either from Outlook or from Windows, itself.

What is interesting is that Windows Explorer can also have issues with long paths, where it won’t be able to support copying files into them. However, it can often support moves to long paths. This has to do with the way that Windows handles the move and how that differs from a copy. This is why you may be having issues dragging and dropping from Outlook (a copy) and not when dragging and dropping from the desktop (a move).

If you are able to reproduce this error, can you tell me what the path is that you are trying to drag to? We can see if path length may have something to do with it.

The file path that I dragged + dropped the email to was:
C:\Users\xxxxxxxxx\odrive\Procore\xxxxxxxx\projects\xxxxx - xxx xxxxx xxx - xxxxxxxxxxxxxxx\xxxxxxxx Internal\Admin Tools (xxxx)\Email History\Emails Accounting\xxxxxxxxxx xxxxxxxxxx

I used “Xs” above to replace any names that I would like to keep private in this public forum.

Hi @giannetti,
Thanks for that information!

That would make the full path:
C:\Users\xxxxxxxxx\odrive\Procore\xxxxxxxx\projects\xxxxx - xxx xxxxx xxx - xxxxxxxxxxxxxxx\xxxxxxxx Internal\Admin Tools (xxxx)\Email History\Emails Accounting\xxxxxxxxxx xxxxxxxxxx\RE_ Re_ xxxxxx_ xxxxxxxxx - xxxxxxxxxxxxxxx_ FedEx Label for Check _ Please Send (xxxxxxxx).msg

That path is 278 characters long, which is beyond the 260 limit where you start seeing issues with other applications.

My guess is that, if you were to drag it to a shorter path, but still within the odrive folder, it would work. Can you give that a try and see if that is the case?

Tony,
I dragged + dropped the same email from above into the folder, below, without any problem. ( I didn’t receive any error message like above.)

C:\Users\xxxxxxxxx\odrive\Procore\xxxxxxxx\projects\xxxxx - xxx xxxxx xxx - xxxxxxxxxxxxxxx\xxxxxxxx Internal

The one thing that confused me about the error message above is that it didn’t say anything about the file name being too long, like the message below which I previously received, when saving a different email to a folder on the Odrive:

The name you specified is not valid or too long. Specify a different file name.

The title on this pop-up window said Rename

Thank you for your assistance with this.

Hi @giannetti,
My guess is that the differences in errors may have to do with some form of pre-checking that is happening within the Outlook application for the file name error.

The error copying message is more of a low-level error, and is likely happening at the point of filesystem copying, where it is failing because of an OS-level “path too long” error.

The error about the name being invalid or too long may be due to a different check being done for illegal characters or the length of the actual file name (as opposed to the full path). Since the file name ends-up being the subject of the e-mail, it can be both extremely long and have odd characters in it that are not allowed within the Windows NTFS filesystem.