Hello,
 
I am using the fileSize just to display to the the end-user.
 
Yes, i have tried using .Net's Directory.GetFiles() but the results seems to be 
same :(> Date: Fri, 26 Sep 2008 10:32:02 -0700> Subject: [DotNetDevelopment] 
Re: - Deleting cache> From: [EMAIL PROTECTED]> To: 
[email protected]> > > 1. What are you doing with the File 
size ?> > 2. Have you tried using the DirectoryInfo.GetFiles method which> 
returns a FileInfo array directly ?> > > On Sep 26, 5:37 pm, Zubair <[EMAIL 
PROTECTED]> wrote:> > Hi,> >> > sorry for the late response.> >> > I am trying 
to delete the Internet Explorer cache for a program i am> > making for my 
boss.> >> > He wants an application similar to cCleaner - (Crap Cleaner).> >> > 
Currently this is what i have> >> > ==============================> >     
Public Sub FindInternetCache()> >         Dim cacheDir As String => > 
Environment.GetFolderPath(Environment.SpecialFolder.InternetCache)> >> >        
 Dim cacheFiles As ReadOnlyCollection(Of String) => > 
My.Computer.FileSystem.GetFiles(cacheDir,> > 
FileIO.SearchOption.SearchAllSubDirectories, "*.*")> >> >         Dim fCounter 
As Integer = 0> >         Dim fSize As Double> >> >         For Each cacheFound 
As String In cacheFiles> >             fCounter = fCounter + 1> >> >            
 fSize +=> > My.Computer.FileSystem.GetFileInfo(cacheFound).Length> >         
Next> >> >         DisplayBox.Text &= Environment.NewLine> >         
DisplayBox.Text &= "IE Temporary Internet Files Found " & "("> > & fCounter & " 
Files) " & SetBytes(fSize) & Environment.NewLine> >> >     End Sub> > 
==============================> >> > BUT when i use the above function - it 
loops through all the cache.> > But it isn't entirely as i want it to be it 
takes alot of time for it> > to load even though there just about 1000 files or 
less in the cache> > when i test this.> >> > Sometimes it even Hangs my machine 
- is there a better method for me> > to do this.> >> > Really would appreciate 
any assistance.> 
_________________________________________________________________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web 
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---

Reply via email to