windowseclipsepath

How to delete a long path in windows.


When importing a project into eclipse, it somehow started creating recursive versions of the directory.

Now, when I try to delete anything, I get the message " the file name you specify is too long."

I can't delete it from the command shell. I can't delete it from explorer. I can't do ANYTHING with it. I have no idea how many copies of it Eclipse created. Eclipse was running for like a minute before I realized something was wrong and I cancelled the operation.

I can get the properties of the top level folder, and it says it contains 497 folders.

Question 1: how can I delete all this stuff in Windows?

Question 2: What the hell was eclipse thinking?


Solution

  • I had a problem similar to this with Eclipse: trying to import a project using Subclipse, it generated a deeply nested set of directories which I couldn't delete.

    I did a couple of things, firstly I edited the directory names down to the shortest length possible (actually I think this was pointless). Secondly, I traversed the directory tree as deeply as possible and then cut and pasted the branch out (which makes it possible to delete the original branch), and then repeated the process.

    @Charlie and @Tomalek's solutions look like they might be more elegant. I don't plan on repeating the experience to find out though.