When trying to delete files or folder, you may run into the error:
The source file name(s) are larger than is supported by the file system. Try moving to a location which has a shorter path name.
This happens when the 255 character limit has been reached or exceeded in the file path and name.
There are several ways to get around this, if you have a newer OS versions you can enable NTFS long path names but the easiest way I have found is to shorten the path name by renaming the directories in the path and the file name. For example:
The file and folder name is:
sales/projects/UO/Gerry/MyLongFolderName/my-projects-blue/light-blue-projects/light-blue-paid-projects/etc…
Right click on the first folder you want to delete (in this example we want to delete the Gerry folder and all its sub folders) and rename it to a single character.
Go to the next subfolder and rename that to a single character as well. In this case we are going to name the subfolders using numbers.
This will shorten the path name each time you rename a sub folder.
Once the folder and file path are less than 255 characters, you will be able to delete the folder.