Delete Prefetch Folder Contents

Dark Dominion
02-11-2007, 07:29 AM
I want to be able to delete the windows prefetch folder. However i don't know what's the right word to use so that the system finds automatically the right folder since not everybody installs windows on drive C:. i think it's %systemroot% but i'm getting an error. So please, enlighten me. Here's my code.

Dim file As String
For Each file In System.IO.Directory.GetFiles("%systemroot%\prefetch")
Next file

02-11-2007, 03:58 PM
take a look at System.Environment.GetFolderPath() (

02-22-2007, 06:41 PM
Cleaning the prefetch folder is a Myth and will reduce performance. Why would you want to do this?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum