Customer Support

Jobs at PopCap
  • Invalid file or File too short error in Plants vs Zombies

We're so sorry you've encountered this error message in Plants vs Zombies.  This error message means that the save data for the game has become corrupted, preventing the game from launching again.  There are a few possible ways to fix this and get back to knocking down the FunDead with your photosynthetic arsenal.  We've listed all three below, and some are more complicated than others.  

Option 1: Windows 7 "Restore Previous Versions"

Windows 7 offers a feature that allows you to restore a file or folder to its previous saved state.  First, you will probably need to change your folder options to "Show Hidden Files and Folders" before you can access the ProgramData directory where the game stores its userdata files.  Click here for instructions on changing this setting.

Once you have enabled the "Show Hidden Files and Folders" option, navigate to the following folder:

C:\ProgramData\PopCap Games\Plants vs. Zombies

Right-click on the userdata folder in this directory, and select the "Restore previous versions" option.  Select the date you would like to reset to, and click Restore.  You will be prompted to confirm this is what you want to do, so just click Restore again.  

If this step is successful, you should be able to launch the game and continue from the saved state you restored.

Option 2: Delete your progress and start over.

The simplest fix for this issue is to delete the corrupted save data.  Unfortunately, this means that you will lose your game progress and have to start over from the beginning, but we’re confident that you can use your superior botanical powers to quickly dispatch those slow-poke, lower-level Zombies.  You can locate your save data in the folder location listed below:

If you are on Windows XP: 

C:\Program Files\PopCap Games\Plants vs. Zombies\userdata

If you are on Windows Vista or 7:

C:\ProgramData\PopCap Games\Plants vs. Zombies\userdata

(Note: if you're on Vista or 7, you probably need to change your folder options to "Show Hidden Files and Folders" before you can access the ProgramData directory and find these files.  Click here for instructions on changing this setting.)

These folder paths refer to the PopCap.com download version and the retail CD-ROM version of the game.  If you bought the game through any other website, the folder path may be different.  Try searching for folders called userdata, and don't forget to change your folder options so that you're searching hidden files as well.

Option 3: Rebuild your files.

This one is the most complicated, but if done successfully, it will allow you to resolve the error without losing any game progress.  It looks like a lot of information, but it's actually very fast--we just want to be thorough in describing the steps.

Once again, you will start by navigating to the folder location listed below:

If you are on Windows XP: 

C:\Program Files\PopCap Games\Plants vs. Zombies

If you are on Windows Vista or 7:

C:\ProgramData\PopCap Games\Plants vs. Zombies

(Note: if you're on Vista or 7, you probably need to change your folder options to "Show Hidden Files and Folders" before you can access the ProgramData directory and find these files.  Click here for instructions on changing this setting.)

  1. Copy the contents of the userdata folder, and save them to a secondary location.  The simplest option will be to copy the entire folder and paste it into your Documents directory or onto your Desktop.
  2. Now delete the userdata folder from its original location.  
  3. Launch Plants vs Zombies.  You will be prompted to create a new user profile.  If there were multiple user profiles, you will need to create the correct number of players to match the number of profiles you need to restore.

    Look in your saved userdata folder to verify how many profiles you need to create.  If you have only user1.dat, then you only need to create one profile.  If you have user1.dat and user2.dat, you need to create two profiles.  If you have ever deleted a profile, you may see that your files are out of sequence; you may have user1.dat and user3.dat, for example.  If that is the case, you need to create three profiles.

    It is important to recreate the profiles in the correct order.  If Mikey played the game first, make sure your first profile is named Mikey, and so forth.  

    It is not necessary to play the game under any of these new profiles; all you're doing is making placeholder files of the same names so that you can replace them with your saved originals.

  4. Exit Plants vs Zombies.
  5. Go to your saved backup folder, and delete the users.dat file.  That's the file that's causing your pain, so be sure to take a moment and revel in the satisfaction of hitting Delete!
  6. In the new userdata folder, delete all of the files EXCEPT users.dat.
  7. Copy the rest of the files from your saved backup folder, and paste them into the userdata folder in the game directory.  You may be prompted to confirm that you want to replace existing files in that location.  You do, so just say yes!
  8. Launch Plants vs Zombies again.  Your game should be right where you left it before that error message came and ate it all up like yummy, yummy brains.

If options 1 and 3 did not resolve the issue, unfortunately the only remaining solution is the deletion of the userdata files so that you can start the game over again.

Need further help?
Back to Top