After emptying the IE cache one day, I decided to check the properties of the "Temporary Internet Files" directory to see how many bytes were being used and was curious to find nearly 100 megabytes of files and folders were still being held captive. As many of you (Windoze users) may know, there are certain directories that the OS tries to hide from the user, and in most cases that's probably a really good thing, because I know if my grandfather had access to some of them, I'd be on call a lot more often to fix his machine ;)

Further exploration using a dos window reveals a curious hidden file named "desktop.ini" containing the following lines:

[.ShellClassInfo]
UICLSID={7BD29E00-76C1-11CF-9DD0-00A0C9034933}

Which presumably tell the OS what to display in the GUI. This file is then also located within several subdirectories containing all the cache files below this level.

After manually removing the "desktop.ini" I discovered that it was immediately put back into place the next time I ran Internet Explorer, so obviously this meant any time I wanted to clear out the cache thoroughly, I would need to manually remove "desktop.ini" from each subfolder I wished to view... Enter perl, and the simple one-liner below will recurse through and delete the "desktop.ini" allowing me to view everything. (why hide it?)

#!perl -w use File::Find; find(sub {unlink "$File::Find::dir/$_" if ($_ eq 'desktop.ini')}, "C:/Windows/Temporary Internet Files");

NOTE: NT users will need to change the path to reflect their profile...



ryddler

In reply to Uncovering hidden Internet Explorer cache by ryddler

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.