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.

The Recycle Bin on one of my XP machines cannot be emptied. The error message is "Error, cannot delete file." Inside the recycle bin are many nested empty folders created by an errant script. Sending the folders to the recycle bin took several hours. And attempting to empty the bin takes a long time and eventually produces the error and causes explorer.exe to consume and not release ram and eventually crash. Deleting c:\recycler then attempting to empty it does not work. I need to know if there a way at a lower level to empty it. My last resort will be a backup(minus the bin) and re-format.

share|improve this question

migrated from serverfault.com Aug 5 '09 at 4:00

This question came from our site for professional system and network administrators.

    
pw for superuser is ewok.adventure –  Jeff Atwood Aug 5 '09 at 4:00
add comment

10 Answers

Restore the files and folders and then hold the shift key down when deleting them. The folder path is problem to long when the folders are in the recycle bin. Holding down the shift key will delete them directly bypassing the recycle bin.

share|improve this answer
add comment

Start - Run - enter cmd for the command prompt

On the prompt enter cd\ to go back to the c:> prompt

Here type rmdir recycler /s confirm and you should be all set

share|improve this answer
    
tried that, no luck –  Jim Aug 5 '09 at 2:41
add comment

Sometimes the problem is caused by one of those files still being open. If the methods already described don't help try again after a reboot. If that doesn't work you may be able to empty the bin from safe mode.

share|improve this answer
    
there are only nested folders in the bin –  Jim Aug 5 '09 at 2:39
add comment
  • Run: cleanmgr /D
  • select drive that has the recycle bin
  • let it scan
  • check only the recycle bin
  • hit OK
share|improve this answer
add comment

Are you able to use the deltree command?

Failing that you could do what was mentioned on this site. Go there and search for the word "robocopy". Hopefully it'll work for you.

share|improve this answer
add comment

It sounds like the path is too long due to the nesting. When I encounter this problem on our file server (for nested folders) I start with the top level folder and rename it to "1" (without the quotes). I then try to delete it and if it's a no go I move to the next folder inside the top level folder and do the same thing. I repeat as neccessarry until I'm able to delete it. renaming the folders to "1" essentially shortens the path by however many characters the original folder name was (-1).

share|improve this answer
add comment

Sometimes disk errors are the cause of not being able to move/delete files, found out what drive the problematic files are on and run a checkdisk with the fix option set to fix any MFT and other issues.

share|improve this answer
add comment

There are so many ways to do for this problem

Way 1 :

There are several utilities to solve such problems, I think they are named "unlock" or something like that. (http://www.emptyloop.com/unlocker/)

Way 2:

You might need to run chkdsk on the drive if you haven't done that.

But you can also try this. Log in under the problem account.

Open a command prompt: start run, enter cmd

at the prompt enter:

rd /s c:\recycler

confirm the prompt and then reboot.**

Way 3

Trying the same in safe mode also is unable to silve the problem. In dos mode also unable to delete the content of c:\recycled*.* . Even cannot delete the c:\recycled.

Way4 :

  1. Open the Run box and enter: cmd

  2. In the command window, type: attrib -s -h %SystemDrive%\RECYCLER press ENTER, then type: rd /s %SystemDrive%\RECYCLER press ENTER.

  3. Restart your computer.

  4. If you still have problems then download Doug Knox's Recycle Bin registry file:

  5. Double-click it or right-click and merge it into the registry.

Way 5:

Several apps have been known to leave a "folder" in My Computer after uninstalling. It is a NameSpace item. Go to REGEDIT.EXE and the CLSID of the icon will be under the key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\explorer\mycomp uter\NameSpace\

Your strange item should be in this area and be obvious. Delete the item when you are sure. It is a good idea to export the ...\NameSpace\ key to a temp.reg file first, in case of errors

Way 6 :

To delete items for good open command prompt. than type in

del c:\users\YOUR USER NAME\desktop\file.*

where YOUR USER NAME put your username and where file.* is the file and the extension.

share|improve this answer
    
Note: Unlocker, as suggested in "Way 1", is designed to find open handles to a file and close them or the process that owns them. It can also schedule a file to be deleted/renamed/moved at startup if the locking process cannot be closed. It is not designed to empty the recycle bin in this manner. –  Bob Jun 12 '12 at 6:22
add comment

Reboot your computer in safe mode and then try to empty your recycle bin.

share|improve this answer
add comment

More often than not it's an NTFS issue: simply MOVE the file on another non-NTFS partition (e.g. FAT32) --you might need Unlocker's help here-- and delete it (don't recycle it, SHIFT+DEL it).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.