How to solve the problem" This filename is too long. Please use a shorter name" in renaming the file attachments?

How “deep” is you library in the structure of your drive?

Windows has a limit in length of filenames which include the entire path (foldernames) to get you there.  Endnote files these PDFs in sub-subfolders of folders where the library resides, and it isn’t hard to get them to be too longs.  

Have you tried using the PDF renaming tools of Endnote?