Which characters to avoid using in OneDrive file names

OneDrive is a cloud service that allows users around the world to store documents and media “on the cloud.” The cloud broadly refers to the on-demand use of third-party system resources. In OneDrive’s case, Microsoft provides a vast amount of storage space to you; this has many useful applications, but OneDrive still has its quirks, most notably when naming your cloud-stored files and folders.

OneDrive’s disallowed characters

This post serves as a resource to aid in naming files for OneDrive, detailing individual characters, phrases, and names to avoid using. You may not see an issue in using invalid characters in OneDrive; you likely don’t know they can cause file and folder sync issues. This issue arises from OneDrive’s use of certain document name characters for background functions. Hence, you cannot enter most of them.


What characters cannot be used in OneDrive filenames

Characters you cannot use

Generally, it would be best to avoid any characters listed below in OneDrive filenames; they aid OneDrive (and Windows) in knowing how to behave when you use a file explorer or search for particular files. Due to this, regular files using such characters can (as reported) cause sync issues or otherwise unexpected behavior for the said file.

"        Advanced search operator
*        Advanced search wildcard operator
:        Indicates start of path within a drive
<        Unknown
>        Unknown
?        Advanced search operator
/        Path to folder or file
\        Path to folder or file
|        Unknown

OneDrive filenames to avoid

Reserved filenames you cannot use

As you might expect, if you must avoid particular characters, you must also avoid some names; albeit, names you were unlikely to be using anyway. Funnily enough, attempting to use some blocked filenames triggers the same error a blocked character would.

CON    PRN    AUX    NUL    COM0 (COM0 through COM9)    LPT0 (LPT0 through LPT9)    desktop.ini

Completely unusable

In most cases, you can use an invalid filename such as CON or PRN with minor variations- such as prefixing or suffixing the filename with an underscore. Despite this, there exist filenames that you cannot use in any capacity. The first is: any file containing the _vti_ string; the second is any file that begins with the ~$ character pair.

Why are these filenames reserved

In recent years Microsoft has been credited for its efforts to keep products backward compatible, most notably with gaming products such as the Xbox One and Xbox 360. However, this is not something new. Back in the DOS era of computing, everything (including external devices and input ports) functioned as files. For instance, if you wished to print a text document, you would just save it to the PRN file- where your printer would receive and print the file.

Initially, this system persisted through to Windows with Windows 95, which was highly reliant on DOS. However, this may seem irrelevant as Windows NT (a newer Windows system at the time) took a different development path. Despite this, Windows NT was the first to reserve such filenames to maintain backward compatibility with Windows 95- this theme continues in Windows 7 and upward.

Filename side-effects in OneDrive

Trying to rename a file with invalid characters within OneDrive

When you attempt to create or rename an existing file within OneDrive you will find you’re unable to use characters OneDrive does not view as acceptable. If you attempt to do so, you will be met with an error message below your filename stating:

Please enter a name that doesn’t include any of these characters: ” * : < > ? / \ | .

OneDrive invalid character error

Trying to rename a file with a reserved name in OneDrive

Unlike invalid characters, entering a reserved filename is not prevented by OneDrive. However, this does not mean your action will take effect. After selecting “Rename” you will be met with an unchanged file and an error stating:

The file or folder name “<PATH TO FILE/FOLDER>” contains invalid characters. Please use a different name. Common invalid characters include the following: # % * : < > ? / |

OneDrive reserved filename error

Recap & Farewell


OneDrive is a Microsoft-owned cloud storage platform that allows users to store and share documents and media. The product’s selling feature enables a user’s uploaded content to be accessed once again on other devices using the platform- without consuming their local storage. While OneDrive possesses no detrimental flaws to its functionality, the application does have peculiarities regarding the naming of files. The most notable include several unusable characters, twenty-four mostly unusable filenames, and two completely unusable filenames. One such peculiarity (filenames) is the result of a foundational drawback within Windows 95- persisting solely due to Microsoft’s efforts to keep its products backward compatible with one another.


Thank you for supporting Business Tech Planet. We continually post new content-oriented around Microsoft365- be it an issue users have encountered, a quirk of the platform (like today), or a new feature. So if you’re a fan of Microsoft365, don’t hesitate to give us a shot! We may possess the answers to your latest questions.

Our related articles:

Jack Mitchell

Jack Mitchell has been the Operations manager at telecoms and MSP Optionbox for more than 4 years. He has played a crucial role in the company, from marketing to helpdesk, and ensures that the IT requirements of over 300 clients are continuously met. With his innate passion for technology and troubleshooting and a particular interest in Apple products, Jack now delivers the most comprehensive tech guides to make your life easier. You can connect with Jack on LinkedIn.

Recent Posts