Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.
D:\>rmdir /S default
default, Are you sure (Y/N)? y
default\default\default\default\default\default\default\default\default\default\default\default\default\default\default\default\default\default\default\default\
default\default\default\default\default\default\default\default\default\default\default - The system cannot find the path specified.

I've also tried Unlocker and various other tools. Can't get rid of this folder. I also tried moving it to another drive then format, no luck.

share|improve this question

marked as duplicate by Synetech, gronostaj, Mokubai, Ƭᴇcʜιᴇ007, Hennes Aug 31 '13 at 15:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
The thread How do I delete a folder which is nested quite deep and avoid "File name too long"? addresses this extensively. –  Synetech Aug 30 '13 at 19:23

4 Answers 4

up vote 1 down vote accepted

your path name is to long.

try `subst x: "default\default" (include the full path and about half the number of "default" then change to x: and try to delete the default folder there, then go back to the root default folder and delete those.

this way you shorten the full path, and windows can delete those folders

share|improve this answer
    
Tried that, and with up to 5 recursive subst. It's still too long. –  Mango Dec 20 '10 at 15:12
    
Haha, kept going and on the 6th it worked :). Thanks –  Mango Dec 20 '10 at 15:14
    
nice, 5% inspiration, 95% perspiration :) –  Weltenwanderer Dec 20 '10 at 15:17

Boot with a bootable Unix/Linux distribution and delete that Windows folder from the Unix/Linux OS.

share|improve this answer

Open up notepad and copy and paste the following:

FOR /L %%1 IN (1,1,50) DO ren test 1&cd 1

Presuming the folder is still located on the D drive, save this file as renamer.bat (or anything you want - .BAT is the important part).

Go to the command prompt and go to the root of the D drive, and type renamer and the batch file should launch and work its way through renaming each folder to something shorter, you should then be able to delete them.

Hope this helps.

share|improve this answer

So I had the same problem, but my folders were about 250 deep, so the subst didn't work for me... Plus they were hidden system folders. I ended up just creating a folder with a simple text file in it, and using robocopy /purge [FOLDER CONTAINING TEXT FILE] [FOLDER CONTAINING RECURSIVE FOLDERS]. I had to run this a half dozen times, as robocopy overlapped itself, I guess, but it worked.

share|improve this answer

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