Ran into an interesting problem this week that seemed trivial but ended up causing quite a bit of headache so I thought it would be great to write this short blog post in case someone else runs into the same issue.
You’ve noticed that one of your file servers contain a file that has a name too long to move or copy to another destination because the following message is presented when an attempt is made:
The file name(s) would be too long for the destination folder. You can shorten the file name and try again, or try a location that has a short path.
Reviewing the file name shows that it is extremely long:
This file name is so long that the server doesn’t provide the choice to rename it and it would fail even if an attempt is made to copy it onto the C drive:
Note the only options available in the screenshot above when you right click on the file are:
- Open with
- Send to
- Compressed (zipped) folder
- Desktop (create shortcut)
- Mail recipient
Attempting to use the command prompt to rename the file would throw the following error:
The filename or extension is too long.
Other troubleshooting steps that were tried but yield the same results are as follows:
- Copy and paste to a higher level folder (no surprise as copying it to the C drive which would have generated the shortest path did not work)
- Copying to the desktop
- Copying to another network drive
- Renaming a top level folder
- Attempting to open the file with Adobe Acrobat so we could resave it
After trying to other steps such as renaming the top level folders and not being able to, what we found was that if we used an application such as WinRAR to compress the file into a .rar file, we would then be able to rename it to a shorter file name within the compressed file, then extract the new renamed file back onto the file server.
Hope this helps anyone who may encounter such an issue on their file server.