Sometimes, when you save files to your personal OneDrive, the file may get renamed by OneDrive. This is particularly annoying when you have saved a file with a name, and later, you cannot find it because it got renamed. If your OneDrive is renaming files, read this article to resolve the issue.
OneDrive keeps renaming files automatically
It usually happens for files whose name contains special characters. For example, a comma, #, &, ~, etc. You will find that these characters are changed into something else. For example:
- 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
If OneDrive is able to 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 rename it yourself manually.
To let OneDrive rename files or folders for you, select the Rename button in the notification and do what is needed.
OneDrive will automatically rename files and folders only for names with the following conditions:
- Names ending with a period
- Names containing unsupported Unicode code points
- Names beginning or ending with a space
- Names with surrogate pair issues
During automatic renaming, OneDrive replaces each invalid character with an underscore. For example, a file named .filename for syncing would be renamed to _filename for syncing.
To manually rename a file or folder in Windows, open Explorer, select the file and press F2. To manually rename a file or folder on a Mac, open Finder, select the file and press the Return key.
Once you have identified the file location, you can rename it.or Finder and navigate to the folder and file marked with the OneDrive error icon, for example:
OneDrive can’t rename such files with these invalid characters
Some characters 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_ have special meanings, and hence 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:
” * : < > ? / \ |
Microsoft Support and Recovery Assistant can rename additional unsupported file and folder names that you store in OneDrive for work or school and not on your OneDrive.com when you’re signed in with your Microsoft account.
I hope this helps.
Related: The names of some OneDrive items contain characters that prevent syncing
OneDrive is not syncing properly; what do I do?
There could be numerous reasons for OneDrive not able to sync properly. However, one of the easiest solutions is to run repairs on your libraries. For this, go to the taskbar notification area. Then right-click or press and hold the OneDrive menu icon, and then click Repair. In the dialog box, click Repair. Finally, once repairing is done, click Finish.
I don’t want Windows to rename my files automatically; how can I stop that?
It is possible to stop Windows from renaming your files and folders automatically. You can change the Default options for that. To do so, right-click the file you want to protect and choose Properties. In the Properties window, under the Security tab, click the Advanced button. Then the Advanced Security Settings window will open, it would let users define permissions for the selected file.