When OneDrive renames items with invalid characters

When OneDrive renames items with invalid characters

When OneDrive can't sync a file or folder because its name contains invalid characters, OneDrive can sometimes rename it for you. Just select the Rename button in the notification you receive.

Screenshot of the Rename notification in the OneDrive desktop sync app

The option to automatically rename files and folders appears only for names with the following issues:

  • Names beginning or ending with a space

  • Names beginning or ending with a period

  • Names containing unsupported Unicode code points

  • Names with surrogate pair issues

During a rename, OneDrive replaces each invalid character with an underscore. For example, a file named .file for syncing would be renamed to _file for syncing.

Other invalid characters that OneDrive can't rename for you

Besides the invalid characters that OneDrive can correct for you, other characters and combinations of characters may also prevent files and folders from syncing. These other characters have special meanings when used in file names in OneDrive, SharePoint, Windows and macOS, such as "*" for wildcards, "\" in file name paths, and names containing .lock, CON, or _vti_. You'll need to rename files or folders to remove these characters before you upload them.

The following characters aren't allowed in file and folder names in OneDrive, OneDrive for Business on Office 365, and SharePoint Online:

" * : < > ? / \ |


  • To rename a file or folder in Windows, select it and press F2. To rename a file or folder on a Mac, select it and press the 'return' key. 

  • Some organizations don't yet support # and % in names. If you're a global admin or SharePoint admin in Office 365, see Enabling # and % Support on the SharePoint blog to learn how to allow these characters.

  • If you're using Office 2010, you can't use "&" in file and folder names.

See Also

Invalid file names and file types in OneDrive, OneDrive for Business, and SharePoint

Sort, rename, or move photos and files in OneDrive

Expand your Office skills
Explore training
Get new features first
Join Office Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.