Old Windows can’t delete files that have more than 260 path name. So, use robocopy to deal with it.
mkdir emptyfolder
robocopy emptyfolder folderwithtoolongpathnames /purge
Source: https://helpcenter.gsx.com/hc/en-us/articles/115002767907-How-to-Clean-Folder-Contents-when-a-Filename-or-File-Path-is-to-long