Thread: Better Code
View Single Post
Old Aug 21st, 2006, 1:17 PM   #14
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
In that case, I wouldn't use the batch file method - using external applications is never a good idea when it's just as easy to do it yourself.

This code may work - I haven't tested it:
Dim PrefetchDir as DirectoryInfo = New DirectoryInfo("%WINDIR%\Prefetch")
Dim files() as FileInfo = PrefetchDir.GetFiles()

Foreach file In files
    file.Delete()
End Foreach
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote