Relevance for files in IE cache older than today

I would like to create relevance for a fixlet that clears the IE cache for the currently logged on user. The relevance should check the below locations and any sub-folders they contain for files with a creation date or modified date that is older than when the fixlet is run if that makes sense.

Windows 10

c:\Users\<username>\AppData\Local\Microsoft\Windows\INetCache\IE

Windows 7

c:\Users\<username>\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5

Is there any way to do this? Currently it is run as a task but I would like to change it to a fixlet to better determine if it was successful or not.

You could have relevance that only runs as success criteria to determine if something worked, but not have it make the thing applicable or not. This is a good idea in cases like this where the relevance might be expensive to run because it will potentially examine LOTS of files, which is not good from a DiskIO perspective as well as a relevance evaluation time perspective.


This should give you the IE Cache folder on all of the mentioned platforms:

(folders "INetCache\IE" of it ; folders "Temporary Internet Files\Content.IE5" of it) of folders "AppData\Local\Microsoft\Windows" of folders of folders "\Users"

This should give you the oldest modification time of a file within that folder:

minima of modification times of descendants of (folders "INetCache\IE" of it ; folders "Temporary Internet Files\Content.IE5" of it) of folders "AppData\Local\Microsoft\Windows" of folders of folders "\Users"

This is the number of files older than a day:

number of descendants whose(now - modification time of it > 1* day) of (folders "INetCache\IE" of it ; folders "Temporary Internet Files\Content.IE5" of it) of folders "AppData\Local\Microsoft\Windows" of folders of folders "\Users"

You should carefully note how long this relevance takes to run in the Fixlet Debugger on a system with a large history.


This will give you the total size of all of the files older than a day:

sums of sizes of descendants whose(now - modification time of it > 1* day) of (folders "INetCache\IE" of it ; folders "Temporary Internet Files\Content.IE5" of it) of folders "AppData\Local\Microsoft\Windows" of folders of folders "\Users"
2 Likes

Thanks so much James this is extremely helpful.

1 Like