The other day a user at my client site called me up as they were unable to rename a folder within their environment. We won’t get into folders and SharePoint now, that’s a post for another day. Whenever they tried to delete a folder they received the following message: Error: Invalid file name. The file name you specified could not be used. It may be the name of an existing file or directory, or you may not have permission to access the file. The error was received in both the GUI and Windows Explorer.
I had never encountered this error message before so to Google I went. There’s a lot out there and it mostly is around custom development. So we tried some of the usual troubleshooting:
- Can she rename the folder?
- Yes
- Can she add files to the folder?
- Yes
- Can she delete files?
- Yes
However, she couldn’t delete one particular file in the folder. And neither could I with my Site Collection Admin access. She couldn’t rename or delete the file. So none of the suggestions worked that I came across on the internet, but I do have a solution, so if none of the suggestions are working that you have reviewed give this one a try:
Check to see if the user has the file inside the folder open.
If the file is open then you won’t be able to rename or delete the file, nor will you be able to rename the folder. It certainly would be nice if the error received actually had something to do with the problem occurring (I realize it kind of does, but let’s be honest.. not really)