Files with special characters on onedrive (MS)

I am using odrive on Mac. I observed that files with some special characters do never synch on one drive (once you rename the files removing the special characters) they sync. Can’t odrive “encapsulate” the names when syncing (renaming by user is not a good option as synced files may linked to by other application files - e.g., mail message files link to attachements that do not sync)

Hi @julian,
Currently files with characters that are not allowed on the operating system/file system will not sync. There isn’t a way to get around this other than renaming. In the future we will have better notification of these occurrences.

We are discussing auto-renaming. We actually had this before, but it caused more problems than it solved so we removed it.

I assume you mean characters not allowed by the cloud-drive selected. Auto renaming is not good as the names are embeded in links that may be included in other files. But adding an escaping mechanism for the restricted characters understood by odrive on windows, mac, ios and android would be good for odrive and would leave out only users that use odrive and the native drive in some combination. Renaming is not practical for places where another piece of software makes the names (like mail programs do with attachments).

Hi @julian,
Can you provide an example, based on one of the files that is being rejected?

I converted names manually. I’ll try to build one later tomorrow.
All the files I had trouble with were AppleMail attachments (I did try to keep a Mail Archive on ONeDrive)

Again - simpler that I thought - I created an rtf file with the text editor in iCloud named “Unsyncable/ blunt.rtf” moved it to one drive and it is Unsyncable!
I practice I have many different forms of names (with escaped graphics) that could not sync
Thi simple file name can definitely be solved by odrive.

Hi @Julian,
OneDrive won’t allow files with certain characters in them, including the “/” character. you can actually see this if you try to upload the file directly to OneDrive using their web client. It will spit out this message:

Please enter a name that doesn’t begin or end with a space, end with a period, or include any of these characters: / \ < > : * " ? |

There isn’t a way to get around this without replacing the characters with ones that are allowed by OneDrive.


You can escape them by taking an allowed character (e.g., %) and replace the ones in your list as %1 %2 etc. and % itself as %% on upload and the reverse on download.
It will work if both the oploader and downloader are odrive. It may not work for names that are too long but ay solve 99% of the cases and you should issue a warning when you can’t do it. Applications that are frequent (like AppleMail with attachments) will work.

Hi @julian,
I see. This type of auto-renaming mechanism is not something we want to do, at this time. There are several complexities to doing it.

For your example of “Unsyncable/ blunt.rtf” there would be a variety of results, depending on the client:

  • On Mac odrive: “Unsyncable/ blunt.rtf”
  • On Windows odrive: “Unsyncable%1 blunt.rtf” ("/" is not allowed in a file name)
  • On odrive Linux Agent: “Unsyncable/ blunt.rtf”
  • On odrive web client: “Unsyncable%1 blunt.rtf” or “Unsyncable/ blunt.rtf”, depending on how we choose to handle rename logic on the web
  • On OneDrive web client: “Unsyncable%1 blunt.rtf”
  • On OneDrive mobile clients: “Unsyncable%1 blunt.rtf”
  • On OneDrive desktop clients: “Unsyncable%1 blunt.rtf”

This approach creates inconsistency across the platforms and clients and can cause confusion to users, especially in multi-user environments.

You also have to be concerned with auto-renaming files that happen to match the pattern we decide to use. In your example it is %1, %2, etc, but files can have these character patterns in them, originally. We could use a more complex pattern, that is less likely to collide with original file names, but then the file name length starts getting larger, which is something else we don’t want to do.

I realize that for your use case, the above considerations may not be a problem. At some point in the future we could provide customized character conversion to allow those that specifically want this type of augmentation. Currently, though, this isn’t something we would want to apply generally.


I understood (and even said so :-)) that if you use renaming and a combination of odrive and native drive or a different platform on up-and-download it will not work. So you may want to make it an option (on both up and download so that “simple-minded-users” will have their platform and application work.

As for your second point the familiar (to all unix hands like myself) is to use double the escape character if it appears in a file (so %1 %2 if they appear are transformed in %%1 %%2 etc , and apply this rule consistently - if you have %% in the name transform it in %%%% etc. - and the caveat is only to stay within the limits of name length which can also be solved with patience and a link or attribute).

If you are not solving this you are severely limiting the ability of odrive to be used on any cloud even for simple use cases (like the same upload and download client).

Thanks for your feedback @julian. I have passed it on to the product team.

Escaping illegal characters solves one problem, adds another,since different OS’s and cloud services also have varying limits on file and path name lengths. These play out in a variety of interesting ways, for example, it’s possible on Windows to create file & path names that you can’t do anything with from the Windows Explorer or command line – but which work perfectly well when accessed over a network.- because the UNC specs differ from the various OS’s that support UNC filenames…

That is clear. You can flag it when encountered. But most applications will rarely reach this limit.
Outlook for MAC does automatic name transformations (I have seen attachments with escaped names of over 200 characters but have not seen even once a name length overflow).

What’s with files with Umlauts in it? (ö. ä, ü - perfectly normal in Germany, for example).

I can’t upload them to Onedrive through odrive, though Onedrive (and the Onedrive client as well as pretty much every operating system since 1980) supports them perfectly. Renaming them would render my setup useless. Is there a reason for odrive to exclude files with Umlauts in it? This limitation pretty much forces me to go back to having all other cloud apps installed instead of using odrive.

By the way: Umlauts are also not correctly encoded within the “Waiting” Queue, they’re correctly encoded in the “Syncing changes” and “Not allowed” Queue. --> Update: I think that was a mistake by me. I don’t have wrong encoded filenames anymore, but upload still does not work)

Furthermore, odrive is re-uploading all of these files over and over again. It has already tried to upload these files for several hundred times, moves them to the “not allowed” queue just to move them to the “waiting” queue.

Uploading these files via Onedrive directly and downloading it via odrive sync works fine, though.

Hi @bastigruenwald,
These should work. My own quick testing allows me to upload these files to OneDrive on both Windows and Mac. When these files end up in “not allowed”, and you click on them, what is the reason message that pops-up?

Can you send a diagnostic from the odrive menu for me to look at?

The error mentioned is, that I’m not longer logged into OneDrive for Business. Which is highly unlikely, as all other files without Umlauts (or some other language characters, like accents) are still uploading. (My current solution is to upload all files with Umlaut manually (which are a lot in different directories, unfortunately) so Odrive marks them as synced afterwards.)

I’ve clicked on Send diagnostics and confirmed it. I’m not sure if it was sent out. I can tell some of the filenames not working if wished.

I may add that odrive is indeed uploading the file, but after having reached 100%, the file is not marked as uploaded and then either move to “not allowed” and put into the queue several moments later again - or its restarting right again.

I can see the file uploaded as a ~tmp-variant within the onedrive weblogin and for each try of odrive, onedrive does creater another ~tmp file.

Hi @bastigruenwald,
I see this same issue on OneDrive for Business. I was previously testing OneDrive. On the upload attempt, OD4B is returning an exception stating that the access token is invalid. This is definitely unexpected. I have reached out to them about it.

And I can confirm the problem is not appearing on a personal Onedrive. All files are correctly uploaded there.

By the way: Special characters in folders don’t seem to be a problem for Onedrive for Business.

Thanks for checking it out!

I’m trying to do a massive download from OD 4 biz and finding it is rejecting 800+ files. Things it appears to be complaining about beyond the list of excluded characters mentioned above include hashmarks and percents - for example… 03 Machine #2.mp3 and 50%.txt

any thoughts on workarounds - or the adding flexibility to selectively support these characters on a user configurable basis?