Enter your email address:

Delivered by FeedBurner

feedburner count

Batch File To Delete Prefetch Automatically in Windows

Labels: ,

The Prefetch is a feature of all versions Windows operating system that actually speeds up the system boot process by a mean of caching. When Windows boots up, certain processes and some important programs like device drivers must load. The necessary files needed to start these processes and programs are stored or cached in the Windows Prefetch folder.

automatically looks Prefetch folder for those cached files during boot up process. If you clean out all the contents of your Windows Prefetch directory, it won’t affect anything worse, but it will sometimes cause a negative impact on performance for most of the Windows based systems. But it will cause your next Windows boot up will take some time because those saved system files are put back on the Prefetch directory by the Windows.If you turned off the file caching in Windows, the commonly used applications will take longer to load .

Cleaning the Prefetch folder in Windows is not necessary because Windows manages it automatically, dropping out the cached file entries that are old or unused or invalid. In addition to making your frequently used programs load slower,the deletion of Prefetch files will also increase Windows boot up time because Windows has to re-copy or re-cached all the page files you "cleaned out".We can easily delete the contents in the Windows Prefetch folder automatically by creating a batch(.bat) file.The steps for this tweak is given below:

  • Open the Notepad editor from Windows Vista start menu->All Programs->Accessories or right click on the desktop and from the opened context menu select New->Text document
  • Type the code "del c:\windows\prefetch\*.* /q" into the opened Notepad window(without quotes).
  • Save the above Notepad file as "DeletePrefetch.bat".Make sure that the file saved with .bat extension and not with .txt extension.
  • You just created a special batch file in Windows Vista that will automatically delete all the files in your Prefetch folder.

Note: First, it's easy enough to go to the C:\Windows\Prefetch folder and manually delete the saved Prefetch files. But I recommend against deleting Windows Prefetch folder files more than once a month or so - otherwise you are defeting the purpose of the system cache.

Larry Miller said...
July 12, 2008 at 8:28 PM


The description of prefetch above is confused and best ignored.

Prefetch was first introduced with Windows XP and is also present in Vista. It is not a cache. Prefetch files are used to optimize boot and application launch times. Application prefetch files are referenced only when the program is launched. Unused or rarely used entries will have virtually no impact on performance. In any event the folder is self cleaning after 128 entries.

The author is correct in stating that cleaning the folder will impair performance. There is nothing to be gained by doing this.

Anyone who suggests that cleaning the prefetch folder will improve performance has no understanding of how it works.


Larry Miller
Microsoft MCSA

admin said...
July 13, 2008 at 11:17 AM

Thank you for your enlightening comment.Why try yo serve the best, it's true that there are many details about prefetch and effects on your OS.


Anonymous said...
December 30, 2008 at 12:28 AM

Great Idea.

The windows prefetch system is just another idea that looks great on paper but just doesn't deliver. In fact, it DOES hurt system performance and especially at boot times.

If the prefetch system worked, then after a nice long boot up, clicking on Internet Explorer would yeild almost an instantaneous load up without any access from the hard drive since it was "prefetched" into memory at start up. Well, that never happens with anything.

I restore systems on a daily basis and one of my favorite things to do is delete the prefetch files.

Anyone who says differently has little or no experience with windows.

Give it a try, you will see it's a no brainer. Just don't delete the the layout.ini file.

Larry=Epic Fail

Anonymous said...
March 6, 2009 at 12:38 PM

Do we get rid of the files or not?
My friend wanted to help, so he told me to get rid of ... wtvr's in there. So I did. and Now I'm scared.
Someone help?

sench said...
May 6, 2009 at 12:34 AM

I didn't know what prefetch files are, until I got History Killer Pro.
What do you think, is there any sense to delete prefetch files once a month?

magakos said...
May 6, 2009 at 9:06 AM

lt's better leave the prefetch files when you don't have any problem

Post a Comment