For whatever reason you get involved in such issue where windows OS will not allow you to delete, edit or copy a folder or files, you, despite being disappointed on windows operating system and instead of using other difficult and lengthy ways to sort things out for you. consider a most common sensed way to deal with it.
Let suppose you have a file at below location
c:\my first folder>2nd folder> 3rd folder>4th folder>5th folder>6th folder>many other folder> a file with long long long long name.jpg
No need to get indulged in registry editing for long edit or other processes but simply copy the whole path into a notepad, only if you want the same folder’s name again but most of the as we just want to delete such file so no need for such path.
Now Start from the main folder “my first folder”, edit its name to a single character like “1”, in the same way do edit the name of other sub folders like “2nd folder> 3rd folder>4th folder” as “2,3,4” respectively till the last folder, once you will update the name of all folders to a single character, now you would be able to edit the name of file, can delete it or copy it somewhere.
Once after updating folder names path may look like
c:\1>2>3>4>5>6>7> a file with long long long long name.jpg
Now after shortening the name of your file, you may revert the path by updating the names of folders back to its original as below.
c:\my first folder>2nd folder> 3rd folder>4th folder>5th folder>6th folder>many other folder> a file with small name.jpg