Jump to content

Editing .ini to delete files older than 30 days


HatIS

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

*** Out of Beer Error ->->-> Recovering Memory ***

Worried about 'Tracking Files'? Worried about why some files come back after cleaning? See this link:
https://community.ccleaner.com/topic/52668-tracking-files/?tab=comments#comment-300043

 

Link to comment
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):

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.

Link to comment
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.

*** Out of Beer Error ->->-> Recovering Memory ***

Worried about 'Tracking Files'? Worried about why some files come back after cleaning? See this link:
https://community.ccleaner.com/topic/52668-tracking-files/?tab=comments#comment-300043

 

Link to comment
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...

Important Information

By using this site, you agree to our Terms of Use.