Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

How to Fix “The File Name Isn’t Allowed” in OneDrive

Check invalid characters, reserved names, path length, and file-type restrictions before troubleshooting or resetting the OneDrive sync app.

Table of Contents

If OneDrive says a file name is not allowed, start by checking the name and its parent folders. A reset cannot make an invalid name valid. If the same file uploads successfully on the web but fails in the desktop app, investigate the local path and sync client next.

1. Check the name of the file and every parent folder

For Windows and cross-platform compatibility, remove these restricted characters:

" * : < > ? /  |

A normal apostrophe is not the double quotation mark in that list. Also remove leading or trailing spaces and a period at the end of a name. On Windows, select the item in File Explorer and press F2 to rename it. Keep the real extension, such as .docx, intact.

Avoid reserved names including CON, PRN, AUX, NUL, COM0 through COM9, and LPT0 through LPT9. OneDrive also restricts .lock, desktop.ini, names starting with ~$, and the string _vti_. Microsoft lists additional context-specific exceptions in its OneDrive and SharePoint restrictions.

For example, replace Budget: draft?.xlsx with Budget-draft.xlsx. Check the entire folder chain too: a valid file name inside an invalid folder can still fail.

2. Shorten a long path

OneDrive and SharePoint limit the complete decoded cloud path, including the file name, to 400 characters. Individual file and folder names and desktop applications have additional limits. A file that works on the website can therefore still have a path problem on your PC.

Shorten folder names, reduce unnecessary nesting, or place the file closer to the top of the intended OneDrive folder. Check that you are not unintentionally changing its shared location. Microsoft's path-length guide explains the platform differences.

3. Distinguish a name error from a blocked file type

Temporary .tmp files do not sync, and local system files such as desktop.ini and .ds_store normally do not either. Do not rename a temporary lock file just to force it into the cloud.

Outlook .pst files are supported by OneDrive, although their syncing behavior differs. Work or school administrators can block particular types. Do not assume all .exe, .aspx, or other extensions are universally forbidden, and do not change an extension to bypass a restriction. Ask the administrator about the specific blocked item.

4. Test the same upload on the web

Sign in to your usual OneDrive website and try uploading the file to the intended folder. If it fails there too, read the exact error: naming, permissions, storage, or organizational restrictions may be responsible.

If the upload works, check the local path, the OneDrive activity message, and whether syncing is paused. Confirm the web copy is current before taking further steps. If your problem is opening a file rather than uploading it, see our OneDrive file-access troubleshooting guide.

5. Reconnect or reset the sync app if needed

Before reconnecting, preserve any unsynced local changes. Online-only placeholders are not local backups; our Files On-Demand guide explains the status icons.

How to fix file name not accepted error on OneDrive Picture 1

Open the OneDrive cloud icon in the taskbar, select the gear, and open Settings > Account > Unlink this PC. Then open OneDrive and sign in to the correct account again. Review the folder choice and prompts rather than creating an unnecessary duplicate sync folder.

How to fix file name not accepted error on OneDrive Picture 2

If a valid file still fails because of the Windows sync app, Microsoft's reset instructions provide this command. Press Windows + R, paste it, and select OK:

%localappdata%MicrosoftOneDriveonedrive.exe /reset

How to fix file name not accepted error on OneDrive Picture 3

If Windows cannot find that installation, Microsoft's alternatives are:

C:Program FilesMicrosoft OneDriveonedrive.exe /reset
C:Program Files (x86)Microsoft OneDriveonedrive.exe /reset

Open OneDrive from Start afterward. A reset resets its settings and disconnects sync connections, then triggers a full sync; Microsoft says it does not delete your files. Recheck account and folder settings and allow syncing to finish. If the error persists, record the full message and affected path for your support team.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.