Recently I needed to remove a shared folder and found it contained files with extremely long filenames. Unfortunately, Windows was unable to rename or delete the files.
For the solution, I found two options. The first is using Robocopy. Create a new empty folder. Run Robocopy and set the source as the new empty folder and the destination as the path/folder you want to delete. End the Robocopy command line with a /purge.
The second solution is using 7-Zip. If you don't already use this as your zipping/unzipping tool, you should. Open 7-Zip File Manager and navigate to the problematic folder and perform a Shift-Delete.