469,648 Members | 1,536 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,648 developers. It's quick & easy.

Cannot Enumerate IE Temporary Files Folder

VS 2003, XP SP2

------------------------------------------------------------
DirectoryInfo temporary = new
DirectoryInfo( Environment.GetFolderPath(Environment.SpecialFolde r.InternetCache));
FileInfo [] files = temporary.GetFiles();
foreach(FileInfo fi in files)
{
Console.WriteLine(fi.FullName);
}

-------------------------------------------------------

This is the only output.

C:\Documents and Settings\test\Local Settings\Temporary Internet
Files\Temporary Internet Files\desktop.ini

--------------------------------------------------------

Why aren't the other files shown?

---------------------
Thanks
Rajiv Das
Nov 17 '05 #1
3 3696
On Tue, 8 Nov 2005 03:19:03 -0800, Rajiv Das wrote:
VS 2003, XP SP2

------------------------------------------------------------
DirectoryInfo temporary = new
DirectoryInfo( Environment.GetFolderPath(Environment.SpecialFolde r.InternetCache));
FileInfo [] files = temporary.GetFiles();
foreach(FileInfo fi in files)
{
Console.WriteLine(fi.FullName);
}

-------------------------------------------------------

This is the only output.

C:\Documents and Settings\test\Local Settings\Temporary Internet
Files\Temporary Internet Files\desktop.ini

--------------------------------------------------------

Why aren't the other files shown?


What other files? Desktop.ini is the only file in the Temporary Internet
Files folder. Everything else in there is a sub-folder. If you want to
see everything you'll need to get the folders and then traverse into each
one of them getting the files. Most of the Internet Explorer cache is in
sub-folders under the Content.IE5 (if using IE5 or IE6) folder under
Temporary Internet Files.
--
Tom Porterfield
Nov 17 '05 #2
see the snapshot here at ImageShack:

http://img495.imageshack.us/img495/7581/untitled5mo.jpg

Just to add, I am using IE7 beta 1.

Moreover, I don't see any ContentIE folders etc.
--
---------------------
Thanks
Rajiv Das
"Tom Porterfield" wrote:
On Tue, 8 Nov 2005 03:19:03 -0800, Rajiv Das wrote:
VS 2003, XP SP2

------------------------------------------------------------
DirectoryInfo temporary = new
DirectoryInfo( Environment.GetFolderPath(Environment.SpecialFolde r.InternetCache));
FileInfo [] files = temporary.GetFiles();
foreach(FileInfo fi in files)
{
Console.WriteLine(fi.FullName);
}

-------------------------------------------------------

This is the only output.

C:\Documents and Settings\test\Local Settings\Temporary Internet
Files\Temporary Internet Files\desktop.ini

--------------------------------------------------------

Why aren't the other files shown?


What other files? Desktop.ini is the only file in the Temporary Internet
Files folder. Everything else in there is a sub-folder. If you want to
see everything you'll need to get the folders and then traverse into each
one of them getting the files. Most of the Internet Explorer cache is in
sub-folders under the Content.IE5 (if using IE5 or IE6) folder under
Temporary Internet Files.
--
Tom Porterfield

Nov 17 '05 #3
On Tue, 8 Nov 2005 04:15:03 -0800, Rajiv Das wrote:
see the snapshot here at ImageShack:

http://img495.imageshack.us/img495/7581/untitled5mo.jpg

Just to add, I am using IE7 beta 1.

Moreover, I don't see any ContentIE folders etc.


Calling GetFiles isn't going to get you folders. You'll need to call
GetDirectories to get that folder. What you see when browsing the
Temporary Internet Files folder through Windows Explorer is not the actual
contents as they are written to the file system. Delete the desktop.ini
file from Temporary Internet Files (either at the command prompt or in your
C# program) and then open the folder in Explorer to see what I mean. Make
sure you don't run Internet Explorer before browsing the folder in Windows
Explorer as IE will put the desktop.ini file (which tells Windows Explorer
to view the folder using a special filter rather than simply showing the
contents as they are stored in the file system) back.
--
Tom Porterfield
Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by dave | last post: by
2 posts views Thread by Rick Strahl [MVP] | last post: by
2 posts views Thread by Kiko + | last post: by
12 posts views Thread by Chad Crowder | last post: by
4 posts views Thread by clintonG | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.