When OneDrive renames items
When OneDrive renames items
When OneDrive can't sync a file or folder because its name contains invalid characters, OneDrive can sometimes rename it for you.
If OneDrive can rename the file or folder, you'll see a Rename option in the notification area. If OneDrive can't rename the file or folder automatically, you'll need to manually rename it yourself.
- To let OneDrive rename files or folders for you
Just select the Rename button in the notification that you receive.

During automatic renaming, OneDrive replaces each invalid character with an underscore. For example, a file named .file for syncing would be renamed to _file for syncing.
The option to automatically rename files and folders appears only for names with the following issues:
- Names beginning or ending with a space
- Names ending with a period
-
Names containing unsupported Unicode code points
-
Names with surrogate pair issues
- To rename files or folders manually
- To rename a file or folder in Windows, open File Explorer, select the file and press F2.
- To rename a file or folder on a Mac, open Finder, select the file and press the Return key.
Tip: To find the file or folder which needs attention, open File Explorer or Finder and navigate to the folder and file marked with the
for example: 
- 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_.
The following characters aren't allowed in file and folder names in OneDrive, OneDrive for work or school on Microsoft 365, and SharePoint in Microsoft 365:
" * : < > ? / \ |
If you're syncing files and folders with OneDrive for work or school, Microsoft has a support tool that can rename additional unsupported file and folder names. Read more about the Support and Recovery Assistant. This tool will only rename files and folders that you store in OneDrive for work or school (when you're signed in with your work or school account). It doesn't rename files or folders on your OneDrive.com when you're signed in with your Microsoft account.
Notes:
-
Some organizations don't yet support # and % in names. If you're a global admin or SharePoint admin in Microsoft 365 Apps for business, 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.
When saving files to your personal OneDrive, certain characters are automatically renamed by Microsoft 365 apps, including Word, Excel, and PowerPoint.
From:

To:

- Filenames that contain , are changed to ^J
- Filenames that contain # are changed to ^N
- Filenames that contain & are changed to ^0
- Filenames that contain ~ are changed to ^F
- How do I prevent Microsoft 365 apps from renaming my files in OneDrive?
Ensure that you do not use invalid or restricted characters in filenames, such as , # " * : < > ? / \ |
Read the full list of Invalid file names and file types in OneDrive, OneDrive for Business, and SharePoint.
Sometimes, OneDrive can rename it for you. In those cases, just select the Rename button in the notification you receive. Learn more about When OneDrive renames items with invalid characters.
- Why can't I share files with changed filenames?
If you shared a filename that contained invalid characters and was then renamed, the people you shared the file with are unable access it because the filename has changed. To resolve this:
- Rename the file. Ensure that you do not use invalid or restricted characters in filenames, such as , # " * : < > ? / \ |
-
Share the renamed file again. Learn more about sharing OneDrive files and folders.