I have tried solving this problem by googling and browsing superuser.com, but haven't found a viable solution yet. I'm running Windows 7 btw.

I somehow got Arduino to recursively create folders named "libraries" within the parent-folder called libraries. Somewhere down the path, there are also some library-files and now I can't delete the damn thing. The path is so deep, that I can't enter it all the way down to the files. Every time I try to delete the files I get an error saying either something like "path too long" or "Directory not empty".

I have tried deleting it through the cmd.exe using:

del /S /Q libraries\*
rmdir /S /Q libraries

I also tried robocopy, as some threads mentioned this as a solution.

robocopy ROBCOP libraries /s /mir

And finally I have tried using a tool called DelinvFile. This tool started to delete the folder, but after deleting ~6000 subfolders, it stopped with the error "Directory not empty".


In this question: How to delete directories with path/names too long for normal delete

Someone suggested using 7zip as an alternative to explorer that has received quite a lot of votes. Perhaps that will work for you.

| improve this answer | |

I tryed different types of software, including some recursive deletion tools. In all cases the software crashed.

I managed to delete the folder, by installing a version of Ubuntu on a USB-stick, booting it up in Ubuntu and deleting it through the terminal using the recursive (-r) parameter. It took between 5-10min for the computer to delete the folder (amazing, as it only contained folders and 300kb of data).

After reboot, Windows felt the need to repair windows. I got a notification saying Windows wasn't able to repair, but when I booted up again everyting was working perfectly.

| improve this answer | |

Try Far manager, it handles long paths better.

Overview from their website:

Far Manager is a program for managing files and archives in Windows operating systems. Far Manager works in text mode and provides a simple and intuitive interface for performing most of the necessary actions:

  • viewing files and directories;
  • editing, copying and renaming files;
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.