While working in Windows, you may encounter a situation, when you are unable to delete a file. The error message that you receive is ‘The filename is too long’. You try to rename the file, but the Rename option is not enabled.
This happens because the full path of the file to be opened can’t exceed 260 characters, The solution for this problem is to rename the folders and subfolders. Cut and paste the folder at the root drive such as D Drive. Then shorten the names of the folders and subfolders to say 1, 2, 3, and so forth. This will shorten the length of the full path, and you will be able to delete the file.
There is a comprehensive discussion on this issue on Microsoft TechNet forum. You can view the discussion here: