Jump to content
CCleaner Community Forums
RunAmok

CCleaner has a problem deleting folders

Recommended Posts

Alan_B, W.E. not reflecting changes would appear to explain some of the strange things I mentioned. But in this case where it seems to show the RO attribute set and DIR shows it's not - with no changes made for months - I think it's trying to tell me something (which CC evidently 'sees' as well) that I can't figure out - yet. DIR tells me that it's not really the RO attribute, and it's not an inherited NTFS permission since it allows me to change it without warning me that it's inherited and I can't change it at that level.

 

I've learned, for example, that W.E.will 'help' us by displaying what it thinks we want to see. For example, it displays the contents of the recycle bins on all hard drives as if they were one recycle bin - no matter which one you're looking at with W.E.. if you use W.E. to look at the subdirectories of RECYCLER on either of two hard drives C: and F:, it shows the interpreted contents of the RECYCLER folders from BOTH drives - but not the actual files and folder names as they exist in each RECYCLER. If I delete a file called test.jpg from some location in the file structure, what's actually in the username folder under RECYCLER is a file named DC4.jpg and detailed info about that file's original path and informaton/attributes contained in a hidden file called info2. W.E. won't show that, (or that info2 exists for that matter - even though I can see hidden and system files elsewhere) but shows you the original path/filename which it obviously pulls from the contents of info2. It shows me what it knows I want/need to see, but not what's really there.

 

And one other wierd thing I found in my testing.... I deleted a file from my desktop - C:\Documents and Settings\username\Desktop - but using cmd.exe and DIR, I found that file ended up in the recycler on the F: drive with all the correct path and details in that info2 so that it could be restored if necessary. Go figure.... Everything works as expected since Windows handles all recycle bins as one big recycle bin, but... that sure wasn't what I expected to see.

Share this post


Link to post
Share on other sites

OK, this is interesting. I copy my SaveTo folder to a temporary folder and then delete it from there, as described above. Then I run CCleaner and it deletes the files within the SaveTo folder (now in the $Recycle.Bin) but not the folder itself. However, if I go to a command prompt and 'rmdir /s C:\$Recycle.Bin\S-1-5-21-2289612737-1512734087-2000572463-1000\\$R2UQ1UEOK' it deletes it! Seems more clear to me at this point that it's something within CCleaner that is not quite right if I can delete this stubborn folder from my command prompt but CCleaner can't...

Share this post


Link to post
Share on other sites

Shodan, On my XP system, the "Send To" folder really does have both the read only and hidden attributes set and when I copy it to some other location those attributes copy too. So I can see that CCleaner might be cautious about deleting a folder with either (or both) attributes set - although it does delete files set as RO as expected. And in fact, in a command window under XP here, if you try to delete a folder with the RO attribute set, it warns that it's read-only and asks if you want to continue - but still doesn't delete it if you answer Y. If you try that with a file set as read only, it simply refuses although Windows Explorer will warn and then move it to the recycle bin. Obviously, Windows (and a cmd window) does handle that RO attribute differently and the cmd window won't let you delete read only folders - or files.

 

In Windows Explorer, if you try to delete a folder with the RO attbibute set, it again warns and asks for confirmaton, but will move it to the recycle bin if you say Y. But... having been warned and given the choice to continue, even though that folder is in the recycle bin with the RO attribute set, a manual empty of the recycle bin does remove anything you put there - including that folder with the RO attribute set. CCleaner may be tripping over the fact that even in the recycle bin, it's still a folder with the RO attribute set. I guess it depends on how CC is programmed to do the deletes on what's in the recycle bin or whether it fails to make an exception for bypassing deletes of RO folders when they're in the recycle bin. And that obvously changed between release 3.10 and 3.11. What I still don't understand is why the portable version works and the downloaded/installed version doesn't - since I'm told they're the same executables although the portable version doesn't look at the registry..

Share this post


Link to post
Share on other sites

RunAmok - I assure you this is not an attribute issue. At least not purely one. I removed the Read only and Hidden attributes on my SendTo folder before deleting it from my TEMP folder and the problem remains. As a crosscheck, I copied a different folder with all attributes set - Read only, Hidden and System - to my temp drive and deleted it. CCleaner erased it from my $Recycle.Bin with no problem whatsoever. Try it for yourself - copy that same SaveTo folder you are referring to, to a TEMP folder and make sure all attributes remain set. Now delete it to the Recycle Bin and I assure you that CCleaner will remove files within it, but will leave the folder itself intact in the Recycle Bin.

Share this post


Link to post
Share on other sites

OK, here is a very simple way to prove that CCleaner does not 'see' certain (protected) folders in the Recycle.Bin. Be sure your Recycle Bin is empty to begin with and copy your SendTo folder to a temp folder and delete it from there. The renamed SendTo folder should now be the only thing in your Recycle Bin. Now open CCleaner and UNtick every single category under both the Windows and Applicatoinos tabs EXCEPT 'Empty Recycle Bin.' Next, temporarily rename your winapp2.ini file (to anything, so that CCleaner.exe won't 'see' it) Now if you click 'Alalyze' you will see that the folder that now exists in your Recycle.Bin from the just now deleted SendTo folder is NOT listed. CCleaner does not 'see' it, and therefore will not delete it. I went all the way back to CCleaner V2.34 and it has NEVER seen these 'protected' folders.

Share this post


Link to post
Share on other sites

OK, here is a very simple way to prove that CCleaner does not 'see' certain (protected) folders in the Recycle.Bin. Be sure your Recycle Bin is empty to begin with and copy your SendTo folder to a temp folder and delete it from there. The renamed SendTo folder should now be the only thing in your Recycle Bin. Now open CCleaner and UNtick every single category under both the Windows and Applicatoinos tabs EXCEPT 'Empty Recycle Bin.' Next, temporarily rename your winapp2.ini file (to anything, so that CCleaner.exe won't 'see' it) Now if you click 'Alalyze' you will see that the folder that now exists in your Recycle.Bin from the just now deleted SendTo folder is NOT listed. CCleaner does not 'see' it, and therefore will not delete it. I went all the way back to CCleaner V2.34 and it has NEVER seen these 'protected' folders.

 

I'm sorry this sounds less and less like a true bug every post. why would one go through all these steps if they truly did want to delete their system folder, and if they didn't actually want to, I should think they'd be quite pleased that ccleaner "failed" to clean it

 

to solve your problem might I suggest a SIMPLER solution? right click the recycle bin choose empty bin (or whatever rubbish the menu says I'm not currently on a PC)

Share this post


Link to post
Share on other sites

Shodan, Since this particular XP Pro system seems to think that all folders are pseudo-read-only - at least according to Windows Explorer, even when the RO attribute is not set - I can't really do a valid test here. All folders do show up in the analyze for the recycle bin (but not those in %temp%), but folders are not deleted, whether or not they're in the recycle bin or in some place like %temp%. In the recycle bin, Info2 contents are set to empty but the folder itself is not deleted. In %temp%, any files are deleted but folders are not.

 

But I did some testing on my wife's XP Home pc (with appropriate caution) and found that CC 3.19 doesn't care if a folder has 'system', 'hidden', 'read-only', or any combination of the three attributes set when it's in the recycle bin. The short answer is that it's Windows XP Pro here not allowing CC to work as it should. But... that doesn't explain why version 3.10 still works, the portable versions work, and all versions downloaded and installed since 3.10 fail. It sounds like you're on a newer Windows release than I am, and your symptoms lead me to wonder if there is a list of 'special' names that CC ignores by design.....

 

Nergal, You're right of course, and that's exactly what I do when I end up with a folder that CC can't remove from the recycle bin. Right-clicking on the recycle bin and clicking on "Empty" works just fine - even if CC has left the recycle in in some weird state. Unfortunately, that's not a workable option here for all those other places which CC attempts to clean but leaves any folder behind. And again, dropping back to 3.10 works as expected. I'm sure it's a full time job changing CC to match where each new version (or patch) in Windows moves things, but it sure would be nice to figure out what changed between 3.10 and all later releases to create the problem this Windows install presents.

Share this post


Link to post
Share on other sites

Nergal wrote: "I'm sorry this sounds less and less like a true bug every post. why would one go through all these steps if they truly did want to delete their system folder, and if they didn't actually want to, I should think they'd be quite pleased that ccleaner "failed" to clean it"

 

(sound of head shaking) Of course I was using 'SendTo' as an example ONLY. And I NEVER DID delete it. That was the whole purpose of copying it to a temp folder before deleting it! PLEASE try this simple TEST. Create a new FOLDER under your Start Menu. Put a few links in it just for good measure. Now delete it! It goes to the Recycle.Bin and CCleaner will delete the links but not the folder itself. And before someone asks 'Why would you delete a start menu folder?' I would ask you - Have you never deleted a Start Menu folder? And someone wrote 'If you want to empty the Recycle Bin simply right click on it and empty it.' Well, duhhhh.. Then I guess we don't need CCleaner at all, right? Sorry if I seem a bit frustrated at this point, but I do get this sinking feeling that no one is actually trying the simple test I am suggesting to prove that CCleaner indeed leaves 'certain' folders behind in the Recycle.Bin. It this is by design, then fine, but I can't believe it is. I just want someone to actually confirm that CCleaner really does leave some folders behind. I believe it's a bug until the author says it's by design.

Share this post


Link to post
Share on other sites

Put a few links in it just for good measure. Now delete it! It goes to the Recycle.Bin and CCleaner will delete the links but not the folder itself.

This deviates from the topic so may be irrelevant.

 

The OP was concerned with a folder that contained files, You are testing with a folder containing links.

Links are not the same as normal files which do NOT designate some other object.

 

I think I remember a topic in the recent past by one person that found when CCleaner was supposed to remove a desktop link it instead (or as well) removed the designated target.

 

If you test the melting point of a steel container the consequences would be affected if it held water or petrol :o

What a folder held may affect what can be done to if after the contents have been removed.

 

There is much that I distrust about the inner workings of Windows,

especially the Distributed Link Tracking which caused me grief until I stopped it.

Share this post


Link to post
Share on other sites
PLEASE try this simple TEST. Create a new FOLDER under your Start Menu. Put a few links in it just for good measure. Now delete it! It goes to the Recycle.Bin and CCleaner will delete the links but not the folder itself.

I have done this test and was NOT able to recreate this issue (see attachments below). This was however on a non-XP machine I will have to wait til monday to test it on a XP machine.

 

post-21882-0-87532500-1340403753_thumb.jpg

 

post-21882-0-41758100-1340404025_thumb.jpg

 

post-21882-0-34576400-1340404026_thumb.jpg

 

post-21882-0-56192800-1340404027_thumb.jpg

Share this post


Link to post
Share on other sites

"This deviates from the topic so may be irrelevant."

 

Not really. The fact remains that certain folders, such as SendTo, Start Menu Folders, just to name a few, will not be removed from the Recycle.Bin by CCleaner. Can't get much more basic than that. I simply threw in the 'links part' to illustrate that CCleaner will delete these folder's contents, but not the folders themselves. Did you try creating a 'test folder,' dragging it to your Start Menu, deleting it and then running CCleaner?? Now check Windows Explorer and you will see the folder still there in the Recycle.Bin. That is my entire point.

Share this post


Link to post
Share on other sites

Shodan, It looks like you're in the same boat I am, and also looking for a paddle. I tried your test, both here on my primary XP Pro system and on my wife's XP Home system. Here, it failed because it was a folder and this system is weird when it comes to folders. On the other system it worked just as you'd expect it to.

Share this post


Link to post
Share on other sites

"This deviates from the topic so may be irrelevant."

 

Not really. The fact remains that certain folders, such as SendTo, Start Menu Folders, just to name a few, will not be removed from the Recycle.Bin by CCleaner.

The fact remains that you are talking about "certain folders" (Send To, Start Menu, etc.) which have special purposes and which contain links.

 

RunAmok's topic concerns general purpose folders and problems with general purpose folders may affect your special purpose folders but the reverse need not apply,

hence I view this as interesting but also a deviation.

 

The Distributed Link Tracking Service is by default Automatic and constantly monitors where files are held and where they are moved to.

It caused major errors and problems when trying to use Acronis to make partition image backups.

I had to disable the service to use Acronis.

 

Windows has so many hidden wheels within wheels, bugs, and vulnerabilities that I hesitate to depend upon a special folder as being an equivalent to a general folder.

 

RunAmok has just reported a difference between an XP Home and a XP Pro system.

I think I would add confusion if I report what 64 bit Windows 7 does,

and my malware defense system (Comodo) would want to block removal of these special folders anyway.

 

Could you be suffering an anti-malware defense action ?

Share this post


Link to post
Share on other sites

For those of you who tried the 'SendTo' experiment and viewed the deleted folder in Windows Explorer's Recycle Bin, indeed it 'appears' to delete while running CCleaner. I use XYplorer as a file manager, as it is far superior to Windows Explorer. Windows Explorer is playing tricks on your eyes. For those who still doubt that CCleaner will not delete this copy of either the SendTo folder or all or part of the Start Menu, I would have those of you with the technical expertise to drop to a DOS prompt and navigate to your $Recycle.Bin and further to the RB's subfolder (S-blah-blah). There, I assure you, you will see the folder that Windows Explorer made you believe was deleted by CCleaner (or by right click and Delete in the Recycle Bin, for that matter.) After successfully running the batch file below, the folder will truly be gone from the Recycle.Bin. Again, the files within these folders, are deleted by CCleaner. Only the skeleton of the folder is left behind. Certainly no big deal, but they will accumulate.

 

If you want to delete these 'folder skeletons' that are left behind, here are the command lines for a batch file that will delete the folders in the $Recycle.Bin that CCleaner will not (at least not so far.) To run this from a command prompt, eliminate one of the two'%' signs in both places first:

===========================

@echo off

rem Be sure you change the S-* number to YOUR $Recycle.Bin designation number

rem The following command also works when run from volumes other than C:

for /d %%a in (c:\$recycle.bin\S-1-5-21-2289612737-1512734087-2000572463-1000\$*) do rmdir /s /q %%a

===========================

 

CAUTION: If you accidentally delete ANY folder by mistake and then run this, you'd better have a good 'undeleter' or backup. :-)

 

I assure you this works, assuming you get the recycle bin designation correct. You may also modify it to delete 'CC undeletable' folders on other drives' $Recycle.Bins by adding additional 'for' lines and changing only the drive designation. Works like a charm. One word of caution, however: This 'fix' merely deletes folders in the recycle bin that CCleaner seems to refuse to delete, it does not erase them. I'll work on that another day. Hopefully future releases of CCleaner will make this procedure unnecessary.

Share this post


Link to post
Share on other sites

Just today with CCleaner's Secure Delete (1-Pass) enabled it gave a crash dialog when it got to the Recycle Bin and didn't empty it. So I restarted CCleaner with Secure Delete (1-Pass) still enabled and it happened again for a second time. So I restarted CCleaner again, and on this third time I disabled Secure Delete and instead used Normal Delete and it didn't give any crash dialogs. I guess all this was a "soft crash", i.e.; didn't cause CCleaner to freeze/lockup.

 

It's also not very easy to repeat the crash because after Normal Delete emptied the Recycle Bin I can't get it to happen again, so I don't know if the original path lengths/names to the files in the Recycle Bin had had something to do with it or not.

 

OS: WinXP Pro SP3

CCleaner Version: 3.20.1750

Share this post


Link to post
Share on other sites

I can save pictures via Firefox to my computer using very long file names in my 32 Bit Windows 7 PC.

 

But when I try to move them, Windows Explorer will declare that it cannot do so because the name is too long.

I can get around this by right-click sending the file to a winrar archive, then right-click extracting it to C:/P (Or where-ever I should wish to do so).

 

Windows Explorer seems to be the limiting factor in cases such as these.

 

Do you suppose your recycle bin error may have been caused by such as this, while attempting a secure delete?

Perhaps the secure delete process may not have been capable of handling very long names whilst regular cleaning can?

 

Just a thought...

Share this post


Link to post
Share on other sites

I tried to duplicate this under XP Pro x32 SP3 using various combinations of file names (up to 52 characters), sizes, paths, etc. I could not duplicate the failure as posted with secure delete enabled, although it did still fail to delete a folder in the recycle bin as described all through this thread.

As we've seen from other posts in this thread, there is definitely a problem cleaning the recycle bin in both XP and W7. The symptoms vary, possibly depending on differences between Windows releases or some other installation specific condition not yet nailed down, but in all cases CC appears to have cleaned the recycle bin (and a subsequent run and Analyze sees nothing to delete) but the recycle bin still contains something (in my case, any folder which was in there to start with).

Windows Explorer displays a combination of what it finds in the recycle bin and the contents of the INFO2 file which holds the details for each file/folder in the recycle bin, and CC correctly cleans the INFO2 file, resetting it to it's 'empty' state. But the actual folder is still there. Windows Explorer won't display anything at that point since there's no details in INFO2 to display, and the recycle bin 'Open' does the same, but a cmd window using the 'dir' command shows what's still there - and can be deleted with no problem using an rmdir command.

Share this post


Link to post
Share on other sites

Do you suppose your recycle bin error may have been caused by such as this, while attempting a secure delete?

 

Like I already stated I don't know if I had anything to do with the path/file length that tripped up CCleaner, or if it was the sheer amount of files I sent to the Recycle Bin. It was the first time CCleaner has ever given me an error dialog, and I've been using it a little over eight years now, but at least it had in the Summary Results exactly where the problem was occuring.

Share this post


Link to post
Share on other sites

OK, guys, I have found a solution to the particular problem I was having, but I still feel there is at least an 'oversight' by CCleaner, if not a 'bug.' As stated numerous times, there are certain folders that CCleaner will not remove from the Recycle Bin. Among them are SentTo and Media. I'm sure there are more. These folders will delete using Windows 'Empty Recycle Bin' but CCleaner will not delete the folders UNLESS they are specifically listed under Options/Include. Once I put the Recycle Bin folders there, e.g. C:\$Recycle.Bin\S-1-5-21-2289612737-1512734087-2000572463-1000\*.* then and only then will the folders be removed by CCleaner. Again, CCleaner will remove the contents of these folders, but not the folders themselves unless the Recycle Bin is listed under 'Include.' This resolves the problem I originally wrote about, but it seems to me that CCleaner should remove these folders without having to 'Include' them under Options....

Share this post


Link to post
Share on other sites

Weird.... First of all, when I try to select the recycle bin, CC won't let me specify what I want. If I try to use the "folder" option to specify Sxxxxxx, it won't let me browse any farther than Recycler. The Sxxxxxx directory is never shown - even though I'm set to view hidden and system files/folders. If I try to specify a "file", it then lets me see Sxxxxx (and the folders in there), but wont allow any options as far as file types or wildcards. And it won't delete Recycler in the first case, or Sxxxxxx in the second case - which doesn't surprise me since both do have hidden or system attributes..

 

I also tried it with the folder option using the full path to %temp% and specifying *.* for the file name option, plus setting it to "all files, folders and subfolders". By the way, if I specified "*." (star-dot) for a file name, it came back with an error message box telling me that was not allowed "For system safety reasons". Anyway, a DOS window confirmed there were files and folders there to start with, and the Analyze showed the Temp Files line - with content - but... when I ran it, once again it deleted all files but not folders. A second Analyze didn't show the Temp Files line - which by then contained only folders.

 

Sooooooo... we know that this XP install - which works normally for everything else but is obviously somehow weird, is causing CC to screw up. I'm still digging to figure out what/why - and how CC "does it's thing"' which trips over whatever weirdness I have here. And again, for whatever reason, the portable version works as advertised here.

 

Shodan,

In your case, I'm still guessing that CC may be programmed to bypass what it thinks are 'reserved names', but will apparently do so if you've config'd a specific "Include". Still... that doesn't explain why it fails to delete those folders when they're in the recycle bin (where they should be fair game no matter what) and renamed to whatever special naming convention the recycle bin uses - although at that point it could determine what the original directory name was from looking in the INFO2 file.

Share this post


Link to post
Share on other sites

Recently my v3.16 was bugged, among other issues it could not see any files in Recycle Bin, therefore could not remove them. I completely uninstalled CCleaner, searched my Win7 pc and removed all CC traces, reinstalled a fresh copy from filehippo. Now it works fine.

 

Try it. :)

Edited by Nergal
removed spam links banned member

Share this post


Link to post
Share on other sites

iopl,

I've been down that road many times as I try to figure out where the problem is. The bottom line is that removing the current version (and any registry entries left behind by the uninstall) and installing version 3.10 works. Doing the same thing and installing any version after 3.10 does not. But for some reason, the portable versions always work fine.

Share this post


Link to post
Share on other sites

spammer in thread has been banned

Share this post


Link to post
Share on other sites

First the good news.... I've fixed ALL the annoying and persistant problems I've had with CCleaner, starting almost a year ago - the failure to correctly empty the recycle bin if it contained a folder, and failure to delete folders elsewhere, both of which begin in release 3.11, and even the Recycle Bin icon not changing from full to empty problem which begin in release 3.19 (I think - I've lost track along the way).

 

All along I've strongly suspected it was something in the registry ever since I learned that the portable versions worked and the installed versions (both free and Pro) didn't. Multiple times along the way when I'd tried the old 'uninstall/reinstall' trick, (plus a registry scan to delete any left over CC keys) I'd found one 'leftover' registry entry which made me raise an eyebrow as I went through the registry and deleted any CCleaner entries after an uninstall. There was a key in HKCU\Software\Windows NT\CurrentVersion called "AppCompatFlags" which contained a sub-key called "Layers" populated with the full path to CCleaner's exe as a REGSZ set to "WIN95" - which stuck me as strange, but... every time I reinstalled, it was back, so I sorta ignored it as some strange thing that CCleaner's install did under XP for reasons known only to Piriform.

 

This time though, when I discovered that CC worked as it should when logged in as the system's Administrator ID (which I seldom use) and still failed when logged in under my own admin ID, comparing the registry HKCU entries between my ID and the Administrator ID, it reminded me about that key and the suspicious WIN95 value since it wasn't there in the Administrator's HKCU. To make a long story at least a little shorter, CCleaner installed versions, both Free and Pro, up to somewhere between 3.18-3.22 set that key - but only in the HKCU list for the id you're logged in with when installing. And that may even include releases before 3.10 although it only began causing the problems in 3.11. If you delete that "AppCompatFlags" key, CC works as advertised, correctly emptying the recycle bin and deleting folders where expected.

 

From at least 3.23 on (and maybe several releases earlier), that key is no longer set by a fresh install. And though I'd done half a dozen uninstall/reinstall (some with reg scans to remove 'left over' keys, some without) along the way), even when uninstalling 3.25, that key is not removed if it exists.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...