Jump to content
CCleaner Community Forums

Editing .ini to delete files older than 30 days

Recommended Posts

Following the "Including files and folders for cleaning" help doc I see at the bottom of the page .ini files have the same functionality, but I can't find any parameters for the option "only delete files or folders older than:" that is at the bottom of the menu. Is only Including files available in .ini files? 

Link to post
Share on other sites
  • Moderators

Interesting question.

Unfortunately many parts of the documentation are somewhat out of date, we have been promised they are working on updating it.

First to say that I am not familiar with using .ini files. But I had a go and found the delay parameter for includes, see below.

The guys on the winapp22 thread should/will have a better clue about all the current .ini switches and parameters and how to use them.

The only similar .ini parameter that I can find in the ccleaner documentation is 'DelayTemp' which says "If enabled, CCleaner will only delete temporary Windows files older than 48 hours."

So that is saying 48 hours and not 24, and there isn't even one documented for the recycle bin delay, which is one of the advanced options.

You could set up an include with 'Only delete files or folder older than 24 hours' selected, save your settings as an ini (Options>advanced), and then look at the created ccleaner.ini file to identify the switch/parameters.
(You can delete the ccleaner.ini afterwards  - but be aware that doing so will reset CCleaner back to the default options as if newly installed for the first time, so you will lose all includes/excludes/cookies to keep/etc. that you have added and any options you have changed from default).

I tried that myself-  I created an include for the fictional "J:\ *.*\*.dwg" with older than 24 hrs set, and then closed ccleaner to create a new ccleaner .ini

That created the following entry in ccleaner.ini -Include5=PATH|J:\*.*\|*.dwg||1|0|24

So it's the 'IncludeX' from that above documentation, but with some new, undocumented, parameters added.
Obviously that |24 is the 24 hour delete delay switch for the specified path/filename. (Change it to how many hours delay you want/need).

I tried again, this time I set the include to "J:\*.*", All files, include Files, subfolders, and the folder itself, 48 hr delay.
This time the resulting .ini entry was: Include5=PATH|J:\*.*\|*.*|REMOVESELF|1|0|48

Hope that helps, have fun playing with the parameters and checking the resulting .ini entries.

Link to post
Share on other sites
  • Moderators

These are the only two "delay" items in my portable version (I don't use any delays so they're set to zero - all configured via the GUI however):



DelayTemp is obvious, I'm thinking DelayRB is for backing up what the registry cleaner removes but I'm not sure.

Link to post
Share on other sites
  • Moderators
13 hours ago, Andavari said:

DelayTemp is obvious, I'm thinking DelayRB is for backing up what the registry cleaner removes but I'm not sure.

Not quite.

Those are the 2 'older than 24hrs' settings from Options>Advanced.

"DelayTemp" is the older than 24hrs for Windows temporary files.
"DelayRB" is the older than 24hrs for the Recycle Bin.

They are binary switches - either '0' for off, or '1' for on.
If you want a different delay than 24hrs for them then it should be possible, but would take a bit more work.
You would have to tell CCleaner not to clean them in the standard lists (untick them) and then add them as an include specifying the delay that you want.
Whilst that's easy enough for the RB, it's more complicated for the System Temporary files.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...