Jump to content
CCleaner Community Forums
Sign in to follow this  
HatIS

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? 

Share this post


Link to post
Share on other sites

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.
https://community.ccleaner.com/topic/32310-winapp2ini-additions/#comments

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."
https://www.ccleaner.com/docs/ccleaner/advanced-usage/ccleaner-ini-files/using-ccleanerini-to-modify-how-ccleaner-runs

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

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.

Share this post


Link to post
Share on other sites

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):

DelayRB=0
DelayTemp=0

 

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

Share this post


Link to post
Share on other sites
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.

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...
Sign in to follow this  

×
×
  • Create New...