Jump to content
CCleaner Community Forums
Fleet Command

Deleting a specific file name from a folder and all its subfolders

Recommended Posts

Hi, everyone.

 

I would like to configure CCleaner to delete files with certain file names (such as checklist.ms, _cache.tmp or thumbs.db) from a folder and all its subfolder every time I perform a cleanup. But I can't get it right. I tried Include or Exclude feature but somehow it not all the files are found.

 

I visited help section too but to no use. Can anyone please tell me how to this?

 

Thanks in advance

Share this post


Link to post
Share on other sites
Hi, everyone.

 

I would like to configure CCleaner to delete files with certain file names (such as checklist.ms, _cache.tmp or thumbs.db) from a folder and all its subfolder every time I perform a cleanup. But I can't get it right. I tried Include or Exclude feature but somehow it not all the files are found.

 

I visited help section too but to no use. Can anyone please tell me how to this?

 

Thanks in advance

 

you need to wild card the entry. By default ccleaner adds *.*

 

Go to options - tools - include - add folder -

 

when the dialog appears in the bottom left you will see another textbox with the value *.*

 

change this to *.ms (or what ever name you want)

 

you will need to add a new entry for each wild card

Share this post


Link to post
Share on other sites
maybe if you used modified your own winapp2.ini file : http://docs.piriform.com/ccleaner/advanced...leaner-to-clean

Thanks. I'll try that. I hope it's not complicated.

 

you need to wild card the entry. By default ccleaner adds *.*

Go to options - tools - include - add folder -

when the dialog appears in the bottom left you will see another textbox with the value *.*

change this to *.ms (or what ever name you want)

you will need to add a new entry for each wild card

It's to no use because:

 

  1. I did that but CCleaner only found a single .ms file, the one in the root folder. No .ms from subfolders.

  2. I have other files .db extension that are valid database files instead of thumbs.db.

 

Share this post


Link to post
Share on other sites
  1. I did that but CCleaner only found a single .ms file, the one in the root folder. No .ms from subfolders.

  2. I have other files .db extension that are valid database files instead of thumbs.db.

 

 

CCleaner does not include subfolders when adding a folder to include. you will have add each folder.

 

#Maybe this is a new possible suggestion you could ask for? an option to wild card files and then search it's sub dirs?

 

But as it currently stands it will only clean the added dir. No sub.

Share this post


Link to post
Share on other sites
Thanks. I'm going to suggest it. (I cannot add all subfolders. There are 227 folders and subfolders.)

 

I think it could prove quite a useful suggestion to some people. Manually adding 200 sub folders would become very tedious

Share this post


Link to post
Share on other sites

winsys2.ini method is not working properly. For example, although this code works...

 

[Thumbs.db files on Drive K]LangSecRef=3002Default=FalseFileKey1=k:\Images|*.db|RECURSEFileKey2=k:\Images|*.ms|RECURSE

 

...this one doesn't work at all:

 

[Thumbs.db files on Drive K]LangSecRef=3002Default=FalseFileKey1=k:\Images|Thumbs.db|RECURSEFileKey2=k:\Images|Checklist.ms|RECURSE

 

The second code finds absolutely nothing.

 

EDIT: Same for winapp2.ini. This code works:

 

[Thumbs.db files on Drive K]Section=ExperimentalDefault=TrueDetect=HKLM\SoftwareFileKey1=k:\Images|*.db|RECURSE

 

 

But this one doesn't:

 

[Thumbs.db files on Drive K]Section=ExperimentalDefault=TrueDetect=HKLM\SoftwareFileKey1=k:\Images|thumbs.db|RECURSE

 

Share this post


Link to post
Share on other sites

I think your solution is to resort to a good ole batch file for removal. ;) If you do make a batch file hidden files like thumbs.db may need attributes removed like hidden, etc., for them to actually be deleted.

Share this post


Link to post
Share on other sites
winsys2.ini method is not working properly. For example, although this code works...

 

[Thumbs.db files on Drive K]LangSecRef=3002Default=FalseFileKey1=k:\Images|*.db|RECURSEFileKey2=k:\Images|*.ms|RECURSE

 

...this one doesn't work at all:

 

[Thumbs.db files on Drive K]LangSecRef=3002Default=FalseFileKey1=k:\Images|Thumbs.db|RECURSEFileKey2=k:\Images|Checklist.ms|RECURSE

 

The second code finds absolutely nothing.

 

EDIT: Same for winapp2.ini. This code works:

 

[Thumbs.db files on Drive K]Section=ExperimentalDefault=TrueDetect=HKLM\SoftwareFileKey1=k:\Images|*.db|RECURSE

 

 

But this one doesn't:

 

[Thumbs.db files on Drive K]Section=ExperimentalDefault=TrueDetect=HKLM\SoftwareFileKey1=k:\Images|thumbs.db|RECURSE

 

I have pointed out this problem about two or three times already some time ago.

http://forum.piriform.com/index.php?showtopic=19175

http://forum.piriform.com/index.php?showtopic=19877

And a similar problem:

http://forum.piriform.com/index.php?showtopic=20533

I have also received the suggestion to write a DOS batch file and things like that.

In my opinion a cleaner program should be able to do such basic things and NOT require additional DOS-batches to be run. After all, recursing for "*.ext" wildcards works, so why not make it work for "name.ext" files?

Share this post


Link to post
Share on other sites

Hi, again, people.

It's the original poster of this topic, Fleet Command.

 

I just wanted to notify you all that the issue is resolved. Developers of CCleaner have implemented this feature. The INI file now work correctly. Thanks to all who helped. And thanks developers, thank you for having implemented this feature.

 

This topic can now be safely marked as [Resolved].

Share this post


Link to post
Share on other sites

Holy s...! What is this!?

How come we find a several page DOS script for deleting temp files in a forum board of a Windows-GUI program doing exactly that task (only more flexible)? The issue of this thread was originally that something was not working right in CCleaner, not a lecture in DOS scripting. I am sure you can do everything with a DOS batch or you could even recode it in C, but what's the point? As pointed out by FleetCommand ...

This topic can now be safely marked as [Resolved].

... the issue is resolved. So I advise the Mods to close this thread before someone posts how to rewrite your operating system. I am sure, Mr. 5secondnews.com, your suggestion was well-intentioned. That's +3 points for programming skills but -10 for wrong forum.

 

kind regards,

Mike

 

PS: please excuse my sarcasm :rolleyes:

PPS: Btw, it is a much debated issue whether it is a good idea to clean the prefetch cache. (see http://www.populartechnology.net/2005/10/c...ation-load.html )

Share this post


Link to post
Share on other sites
PPS: Btw, it is a much debated issue whether it is a good idea to clean the prefetch cache. (see http://www.populartechnology.net/2005/10/c...ation-load.html )

Nice link, pretty much sums up my opinion on prefetch cleaning (I would like to see it removed from CC but unfortunately suspect it never will be) and some interesting discussion in the comments section.

Share this post


Link to post
Share on other sites

Just to make it clear, we are not going to have a return of the 'prefetch wars' that used to happen here.

 

Many posts were made all over the internet and here by Mastertech (also known as Andrew and various other names)

 

People either delete prefetch or they don't.

Share this post


Link to post
Share on other sites
Just to make it clear, we are not going to have a return of the 'prefetch wars' that used to happen here.

Sure thing! I think, if someone doesn't want to delete their prefetch cache, they should simply not tick that little check box. No more, no less.

As it seems, the whole thing is a question of belief, so there's no point in arguing. Wars about belief usually end up in a mess, as we know.

 

But: I still find it sensible to point out that ...... Arghhhh, just read that article above, then you know what I mean.

 

Btw: I realize just now that this has nothing more to do with the thread topic, sorry for that. I just mentioned it because it was in this DOS script.

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...