Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

What is the prefetch folder, and why are there copies of system files there?

Question:

I found a SVCHOST.EXE-2d5fbd18.pf located in C:\windows\Prefetch.
Should I delete it? I regularly run an up-to-date anti-virus scan and it hasn’t noted this as a virus.

Ignore the prefetch folder.

Seriously, there’s nothing you need to do with it, and unlike some tips sites might suggest, there’s nothing you should do with it.

You can delete files in it if you like, but it’ll just slow down your system a little, and they’ll probably reappear quickly anyway.

Now, as to why? It’s Windows, trying to be fast.

Without getting into a lot of hairy technical detail, the process that Windows goes through when you run a program is actually quite complex. There’s just a lot of “stuff” it needs to do in order to load and run whatever software should be running on your machine.

The prefetch folder is simply Windows saving some of that work so it can be re-used later, when you run the same program again. Nothing more.

Like I said, you can, and should, ignore the prefetch folder.

Now, svchost, as has been discussed on this site repeatedly, is a required Windows component that’s run quite frequently. In fact, you likely have several copies of it running on your Windows XP or Vista machine right now. The first time Windows runs svchost.exe it saves some of the work, some of the calculations it makes, so that the second (and third, and fourth, and so on) time it runs it, it can simply skip those calculations and load up the work that it did before.

Updating the program invalidates those calculations, and that’s why the filename has that string of garbage in between the filename and the “.pf”. If the program changes for some reason, that’s no longer valid and a new one will be calculated the first time the updated program is run.

Like I said, you can, and should, ignore the prefetch folder.

The reason I emphasize that is that there are apparently other sites claiming that if you periodically empty the prefetch folder you’ll speed up your system.

They are wrong.

As we’ve seen, by deleting the contents of the prefetch folder, you’ll force Windows to do more work the next time it starts running programs, as it has no pre-calculated information for a head start.

And Windows keeps only at most 128 items in prefetch, so it always contains information for the most recent and commonly run programs.

You can read more geeky goodness about prefetch from a Microsoft engineer here: Misinformation and the The Prefetch Flag, which includes this quote:

… not only is deleting the directory totally unnecessary, but you’re also putting a temporary dent in your PC’s performance.

I rest my case.

Do this

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

I'll see you there!

6 comments on “What is the prefetch folder, and why are there copies of system files there?”

  1. might faulty data in the prefetch folder be a possible cause when programs keep crashing when you are starting them?

    Not typically, no. But it’s certainly safe enough to delete the contents of prefetch to find out.

    – Leo
    30-Oct-2008
    Reply
  2. I suddenly was having trouble using wordperfect 11 in that the first time I opened a file, it took 10-20 seconds to open. After that it worked fine, but if I closed wordperfect, the same thing happened everytime. It appeared wordperfect was going “someplace” and looking for “something.” I cleaned out the prefetch folder and the problem resolved.

    Reply
  3. One of my students installed software and uninstalled and reinstalled (software not working because older version was installed after newer version, etc.)
    Anyway, I’ll be going to the dealership, today, so your answer probably won’t get to me, but what about deleting JUST the files in the Prefetch folder that apply to this software?

    Thanks and glad I found this site.
    Jan

    I’m not sure what purpose that would serve. Just ignore the prefetch folder.

    Leo
    03-Sep-2009
    Reply
  4. I get the whole “ignore the prefetch folder” but I still must ask: I just deleted a malvare file called Your PC Protector from the Program Files and noted there was also an executable file in the Prefetch Folder – should I still ignore the prefetch folder or should I delete the exe file from the folder? *I did a system reboot, disk cleanup, rescan, etc. and the file is still in the prefetch folder. Thank you in advance for your advice.

    Reply
  5. “Ignore the prefetch”? Not cool. There are quite a few fixes in my life that have come from deleting the contents of the prefetch folder (except do NOT delete layout.ini). Usually, the symptoms were things like “Word takes 30 seconds to load”. This was probably because a default place where files were saved (like a user’s network drive) may have changed locations. The system is still trying to preload the old Y drive or whatever and times out over those 30 seconds. Clearing the prefetch (again, except layout.ini) tells the computer to please go check the places to preload again. The next time you open up Word, it takes 15 seonds, and every time after is immediate. Again, the prefetch can also store bad or outdated items, so clearing it every now and again can speed up your PC.

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.