OneDrive reserves the ability to alter invalid filenames, regardless of their acceptability elsewhere. OneDrive performs such changes to prevent internal errors and maintain a satisfactory user experience for you. In most cases, an automated file-rename is intentional, albeit avoidable.
OneDrive will keep renaming your files when the filenames contain characters OneDrive deems invalid. Examples of characters that OneDrive deems invalid are: *, :, <, >, and ?, amongst others.
Often using invalid filenames with OneDrive will result in its frequent renaming of your files. I’ll be helping you resolve this problem with a brief guide on invalid filenames.
-  Can filenames make OneDrive alter my file’s name
-  How to bypass disallowed filenames
-  Are sync conflicts making my filenames change
-  Recap & Farwell
Can filenames make OneDrive alter my file’s name?
Does my initial filename have an impact
Yes: OneDrive may rename files if it finds its name unacceptable — this is done to avoid confusing your device’s operating system. Thus, if you would like to avoid encountering this issue, I recommend conforming to OneDrive’s filename rules. To do so, you need only avoid a few characters and phrases — which frankly aren’t that common. These characters can be problematic due to their meaning within the OneDrive file directory.
/ Indicates pathing to a new folder \ Indicates pathing to a new folder * Indicates requests for a wildcard/random result : Indicates end of a drive name < Unknown at this time > Unknown at this time ? Used for advanced file searching | Unknown at this time
Your character usage plays a large part in OneDrive accepting your filename, and this is because OneDrive disallows a handful of characters you might have considered using. Unsurprisingly these are all “special” characters- though, that’s not to say you can’t have any. For your convenience, I’ve left a list of recently tested characters found not to work with OneDrive. For those unfamiliar, “special” characters refer are the various non-alphanumeric characters made available to you.
" * : < > ? / \ |
Under normal circumstances, you cannot create files containing the above characters due to their use in most operating systems. Take, for instance, “*” which indicates a wildcard, “/” and “\” which we use for navigating our file directories.
In addition to preventing the usage of particular characters, OneDrive also considers specific names to be invalid. This error is not a fault of OneDrive directly but an issue present in even the oldest Windows installations. Before today’s modern computer systems, external devices like your office printer and input ports were interacted with via an associated document on the system. As such, if you just finished composing a letter and wished to print it, you would save it to the
PRN document- where your printer would read and print the file.
CON PRN AUX NUL COM0 (COM0 through COM9) LPT0 (LPT0 through LPT9) desktop.ini
Above are the reserved filenames you should avoid using with OneDrive. Despite having little to no need for this dated system, Microsoft continues to reserve such filenames so that Windows (and OneDrive) may remain backward compatible with older systems.
The final contributing factor to a filename’s validity is whether or not it contains one of two disallowed strings. If any filename begins with
~$ it will immediately be deemed invalid. Similarly, any filename containing
_vti_ will also be considered invalid. Despite not being specifically
_vti_ the examples shown below would both be considered invalid filenames.
Bypassing disallowed filenames in OneDrive
If for whatever reason, you’re adamant about using one of the disallowed filenames, you may take comfort in knowing they can easily be made valid with a minor addition. The addition is an underscore prefixing the filename or suffixing it- before the file extension.
_CON _PRN _AUX _NUL _COM0 (COM0 through COM9) _LPT0 (LPT0 through LPT9) _desktop.ini
CON_ PRN_ AUX_ NUL_ COM0_ (COM0 through COM9) LPT0_ (LPT0 through LPT9) desktop.ini_
Are sync conflicts making my OneDrive filenames change?
What is a sync conflict?
A sync conflict is a problematic occurrence found in OneDrive when OneDrive cannot merge multiple variants of a file. For example, if you have a file stored on OneDrive containing the word “music,” you have no issue. However, let’s say your laptop (which isn’t yet syncing) contains the same file, but you change the word to “piano.” Normally when you start syncing your laptop with OneDrive, it would detect the “piano” version to be the most recent and update itself accordingly. However, in this example, you’ve also changed the file on your PC, to contain “guitar.” Now, when both devices are attempting to sync, OneDrive perceives two “most recent versions” and cannot determine which to merge.
How are sync conflicts handled by OneDrive?
When a sync conflict occurs, OneDrive prioritizes the safety of your documents and avoids completely overwriting one version in favor of the other. Instead, OneDrive will create a separate file with your device’s name appended to the original filename where one version will be stored, and place the other version’s changes in the original file.
No. While OneDrive alters filenames in this instance, it alters the name of a copy of your file. Because of this, it would be unfair to state sync conflicts are a notable cause for filename changes.
Recap & Farewell
When you give a file an invalid filename, you invite OneDrive to disallow your file or rename it. Invalid filenames can be invalid for several reasons: unaccepted “special” characters, usage of a reserved filename, or usage of an unaccepted string within your filename. While you can use some reserved filenames with a single character addition, certain restricted strings are in no way bypassable. Contrary to what some may think, OneDrive sync conflicts are not related to filename changes, actually being the cause of unintended file duplicates.
Greetings reader, I hope this post was of use to you, or at the very least shed some light on what could be going wrong. Here at Business Tech Planet, we’re constantly working hard to produce comprehensive and viable resources detailing the solutions to various Microsoft365 issues, exploring their new additions and features, and answering common queries.
Our related articles:
- How to stop OneDrive changing modified date when opening files – OneDrive possess an esoteric toggle that allows Office applications to sync after being opened. Because the file would (as a result) be updated, Windows would recongise this as a recent modification and update the “date modified” field, regardless of whether or not you changed anything.
- Troubleshooting “Shared with Me” OneDrive files going missing on PC and cloud – Whether you’re sharing or receving, you’re likely not a fan of your files going missing. Join us in this post, where we troubleshoot and explore the issue.
- OneDrive: How to add a shared folder to PC – Shared folders on OneDrive, much like with your own OneDrive folder can be accessed from your own PC. If you’re curious to see- give the post a read.
- OneDrive automatically duplicating files: Cause and fixes – Caching, while providing many seldom discussed benefits, alos possesses infamaous detriments. Take for instance, a place for all your tracking cookies. Though that’s not the topic here- we’re talking about file duplication.