Code to search cache folders for biggest files created

Here's an interesting one: I'd like to create a button in DOpus that allows me to seek out the biggest files accumulated on my computer from website usage. Let's say I use, oh, I don't know...maybe Firefox, Opera or Safari browsers. Now the thing that bothers me is the browsers don't tell you the location of their cache folders (maybe for security reasons?).

In any case that's the location where you'd find big files cached. I'd like to create a button that automatically figures out the biggest files created in the cache folder without me knowing where the cache folder is. It seems like a tall order...but clearly there must be a way of combining search and modify commands to narrow down this task. Any ideas? Thanks.

Even if the files are in various folders, you have a root level for that folders. So you can combine flatview with sorting by size, as a starting point.

All three browsers store their caches below the /localappdata folder by default. They're all easy to find via a few second with Google.

[ul][li]Firefox: type about:cache into the address bar to find the exact path. e.g. on Vista it would be

C:\Users[username]\AppData\Local\Mozilla\Firefox\Profiles[random profile number].default\Cache
[li]Opera: type opera:config#UserPrefs|CacheDirectory4 into the address bar to find the exact path. e.g. on Vista it would be

[li]Safari: Under Apple Computer\Safari e.g. on Vista it would be

c:\Users[username]\AppData\Local\Apple Computer\safari[/li][/ul]

Safari stores its cache within a single data file which you won't be able to search using a file manager.

For the others you could just go to their folders, or search in their folders, and sort by size. Or use the about:cache information which works in Firefox and Opera.