Fixity Labs

Characters you can’t use in OneDrive and SharePoint file names

The exact characters OneDrive and SharePoint reject, the special cases for #, %, & and the semicolon, and how to replace them consistently.

Updated
Reading time
3 min
Applies to
OneDrive, OneDrive for work or school, SharePoint in Microsoft 365

The problem

Nine characters are not allowed anywhere in a OneDrive or SharePoint file or folder name. A single one of them is enough to stop an item from syncing.

This guide is a character reference. For reserved names, lock files and spaces, see the guide on invalid file names.

Characters OneDrive and SharePoint reject

CharacterNameCommon replacement
"Double quotation markRemove, or use an apostrophe
*AsteriskRemove
:ColonHyphen, e.g. "Q3 - Report"
<Less-than signRemove, or write "lt"
>Greater-than signRemove, or write "gt"
?Question markRemove
/Forward slashHyphen, e.g. dates as 2026-11-07
\BackslashHyphen
|Vertical barHyphen

Leading and trailing spaces are also not allowed. # and % are supported, but some organizations have not enabled them yet. & is not supported by Office 2010, and Office desktop apps cannot save into a folder whose name contains a semicolon (;).

Symptoms

  • The item shows a sync error in File Explorer and is listed in the OneDrive activity center.
  • Uploading the file in a browser is refused because of its name.
  • Files copied from a Mac, a NAS or an archive sync partially, with some items missing online.

Causes

  • Names created outside Windows

    Windows File Explorer does not let you type these characters, so on a Windows PC they nearly always come from macOS, Linux, Android, network storage or extracted archives.

  • Dates and versions in names

    Names such as "Report 11/07" or "Final: v2" are natural to type on systems that allow them, and they are the most common source of slashes and colons.

  • Substituted characters

    Some tools replace forbidden characters with look-alike Unicode characters when copying files to Windows. These names may sync, but they look odd and are hard to search for.

How to fix it

  1. List names that contain unsupported characters

    This read-only PowerShell command lists every file and folder below your OneDrive folder whose name contains one of the nine characters. Use $env:OneDriveCommercial for a work or school account.

    Get-ChildItem -LiteralPath $env:OneDrive -Recurse -Force -ErrorAction SilentlyContinue |
      Where-Object { $_.Name -match '[\\/:*?"<>|]' } |
      Select-Object FullName
  2. Choose one replacement rule

    Decide on a single rule, for example replacing every unsupported character with a hyphen. Consistent names are easier to search for and less likely to collide.

  3. Check for collisions before renaming

    After replacement, "Plan: A.docx" and "Plan- A.docx" become the same name. Rename one of them deliberately so OneDrive does not create a conflict copy.

  4. Rename and let OneDrive sync

    Rename items in File Explorer (F2) or in OneDrive in your browser. Pause syncing first if you are renaming many items, then resume.

Before you change anything

  • If files are renamed on the original Mac or server while you rename the synced copy, you can end up with two versions. Agree on one place to make the change.
  • Renaming changes links to the file. Update shortcuts and shared links that point to renamed items.

When OneDriveSyncFixer helps

Microsoft documentation

This guide summarizes Microsoft’s published guidance in our own words. Microsoft documentation remains the authoritative source.

Related guides

  • How to fix invalid file names in OneDrive

    OneDrive and SharePoint skip any file or folder whose name breaks their naming rules. Learn the rules, find the affected items and rename them without breaking links.

    File names and paths3 min read

  • SharePoint file path too long: limits, causes and fixes

    SharePoint and OneDrive allow paths up to 400 characters, but Windows apps often stop at 260. See which limit applies, how to measure a path and how to shorten it.

    File names and paths3 min read

  • SharePoint library won’t sync: causes and fixes

    Troubleshoot SharePoint libraries that will not sync with the OneDrive app: a missing Sync button, read-only libraries, credentials, conflicts and the naming and size rules.

    Sync troubleshooting3 min read