OneDrive may show an "invalid file or folder name" error for a few scenarios. As we discussed in Chapter 12, Managing Sync Security, this error may be displayed if a user is attempting to synchronize a file extension that is blocked by administrative control in the tenant. This is also possible (though less likely) if a user has files or folders that are invalid for SharePoint Online (such as a file named .lock, reserved system names such as CON, PRN, AUX, NUL, LPT0 - LPT9, and COM0 - COM9, the desktop.ini file, or a file with _vti_ anywhere in the name. You also can't synchronize folders that begin with a tilde (~), nor can you synchronize files that begin with a tilde dollar sign (~$). If this error is encountered, you can resolve it by renaming the file or folder.