The Situation
Rename Folder
An unexpected error is keeping you from renaming the folder. If you continue to receive this error, you can use the error code to search for help with this problem.
Error 0x80004005: Unspecified error
You are running into the above error when you try one of the following:
- Rename folders (or possibly files).
- Creating and naming a new folder (or possibly file). The folder (or possibly file) was created but was left with a default name like “New folder”, “New folder (2)”, etc.
This may or may not be specific to OneDrive users and paths. I currently have a sample size of two (one being a random forum thread).
The Cause
I found a forum thread at edugeek that touched on the issue I was having. The thread was describing a slightly different instance of this same issue.
The Windows Registry includes a key named “User Shell Folders” which contain a series of name:string pairs. These values tell Windows Explorer what the actual path is for folders that can be redirected.
Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
As far as I can tell, when you try to rename a folder Windows Explorer tries to parse some (or maybe all) of these paths. If there is a malformed path set for one of these folders, this error is returned and the rename fails.
The example in the referenced edugeek forum thread above was a user customizing their path. They had a typo using “%USERPROFILES%” (with a trailing ‘S’) instead of “%USERPROFILE%” in their customized path. This nonexistent variable seemed to cause their failure.
My failure was slightly different. I’m not sure what caused the issue as I was working on a computer I hadn’t touched before. I found one of the GUID-named pairs had a value of “%USERPROFILE\Pictures”. The lack of a closing ‘%’ character defining the USERPROFILE variable name caused my failure.
It’s been a while since I’ve done in-depth work with Folder Redirection via GPO, but keep in mind that GPOs may set registry values as well. If you find this value periodically changing back, there may be a Local Policy or Group Policy ultimately (re)setting this value.
The Solution
The edugeek thread and I resolved our issues by finding which registry value(s) were malformed and correcting them.
WARNING: Obligatory warning that making changes in the Windows Registry has a possibility of bricking your computer if you do something wrong. Be careful, and consider taking Registry or computer-level backups first.
Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Open Regedit, navigate to the “User Shell Folders” key, and review the data values for all of the registry entries listed. You will likely find one or more entries where the “%USERPROFILE%” variable is somehow malformed. Note the original value(s) and/or back up the registry, then fix the values as needed. Your issue should be resolved immediately without requiring a reboot or log out/in