0

Some time ago, some script (probably Gradle's) created an overly deep folder. I tried answers in this question: How do I delete a folder which is nested quite deep and avoid "File name too long"?, but in first case robocopy just seems to be looping: robocopy job

Using second answer - renaming folders to single letters - system prohibits that after I go deeper, again with a "Destination path too long" message. Need help!

Alexiy
  • 247
  • 2
  • 6
  • What is the Full path? Is it just the above repeated? – NetworkKingPin May 11 '16 at 07:02
  • @NetworkKingPin I don't think it's full path - it may contain some files in the last directory - when I tried changing permissions. it was showing some jars. – Alexiy May 11 '16 at 07:53
  • There are 23 answers in the linked question. Have you tried them all? – DavidPostill May 11 '16 at 13:34
  • Is there data in the deep folders you need to keep? If not, then a recursive rename can help. each folder is renamed to F1,F2,etc, each file is renamed to X1,X2, etc. This helps with both total length but also some other nasty things that can also complicate getting rid of it. Once a full rename is done, most problems evaporate or some other underlying problem gets revealed. – bvaughn Jun 08 '16 at 14:59

2 Answers2

0

You might be able to use the UNC naming convention to get around this. We have to do this sometimes at work (when people have files such as C:\Users\Username\Desktop\2016\January\Fifteenth\Personal\Vacation\pictures from the vacation we took in march\beach\on the beach\camera photos\from my iphone\picture.jpg). We have to create a share of the Desktop folder, and use \LOCALHOST\Desktop\ and remove the folder "2016".

This issue is caused by the maximum path in an NTFS volume. This is defined as 260 characters, with some exceptions.

For further reading, take a look at this MSDN Article

Burgi
  • 6,493
  • 14
  • 39
  • 52
Rikai
  • 54
  • 6
0

Total Commander (official site: http://www.ghisler.com/) can work with paths longer than 255 chars. You should be able to easily delete them by using it to perform the task.

JollyMort
  • 387
  • 2
  • 10