Author Topic: Create a batch file to delete game cache files  (Read 69572 times)

Offline grimsoul

  • Watcher
  • ******
  • Posts: 1632
Create a batch file to delete game cache files
« on: March 12, 2011, 10:23:13 AM »
I keep getting little bugs like the consignment shop not working, missing texture file on the drafting board and find that I have to delete the cache file regularly to to fix them. I've been doing it each time before I start the game and haven't had any problems this way.
So instead of trying to remember to do this each time I made a simple little batch file to take care of it for me and thought that others mid find it useful also.

Open notepad and copy and paste the following into it. You will have to change the directories path if they don't match where your files are. Like if you are using Late Night instead of Ambitions you will have to change that.

Then go to File, Save as... and give it a name like Clean Sims.bat and under the drop down menu for Save as type: change it from Text Documents [*.txt] to All Files then save to the desktop or where ever you want.

When you click the batch file it will run and delete the four cache files then run the Sims.

Edit: Added a line to clear the DCBackup folder but leaving the ccmerged.package file.
From what I've seen any content installed puts a file starting with a 0 in the DCBackup folder. The line I've added deletes all files starting with the number 0 so it leaves the ccmerged file alone.

@Echo off
del "C:\Documents and Settings\My Computer\My Documents\Electronic Arts\The Sims 3\CASPartCache.package"
del "C:\Documents and Settings\My Computer\My Documents\Electronic Arts\The Sims 3\scriptCache.package"
del "C:\Documents and Settings\My Computer\My Documents\Electronic Arts\The Sims 3\compositorCache.package"
del "C:\Documents and Settings\My Computer\My Documents\Electronic Arts\The Sims 3\simCompositorCache.package"
del "C:\Documents and Settings\My Computer\My Documents\Electronic Arts\The Sims 3\DCBackup\0*.package"
start /d "C:\Program Files\Electronic Arts\The Sims 3 Ambitions\Game\Bin" Sims3Launcher.exe
A clear conscience is usually a sign of a bad memory.

Stirus

  • Guest
Re: Deleting cache files
« Reply #1 on: March 14, 2011, 09:09:52 PM »
Nice. Thank you!



Registered members do not see ads on this Forum. Register here.

Offline Huge

  • Townie
  • ***
  • Posts: 128
Re: Deleting cache files
« Reply #2 on: March 15, 2011, 12:07:47 PM »
and now we know your name :lol:

Thanks bud, this will be most useful.

Offline Hosfac

  • Sleeper Agent
  • Watcher
  • ******
  • Posts: 2433
  • Han Solo shot first.
Re: Deleting cache files
« Reply #3 on: March 15, 2011, 02:34:08 PM »
You can also add to this to delete world cache files if your computer uses them by adding lines to it, copying and pasting the script, and following the path to those files.

For now, I have put them in a separate file (but I tested it and it works) since I don't play them often.  But as I'm not familiar with how these things work in windows programming, what happens if the script goes to delete a file that isn't actually there?  Will it create an error, or will the system just ignore that line?
Old forum mods never die.  We just get archived.

Interview With a Night Walker - The Veronika Beltane Story continues.

Offline grimsoul

  • Watcher
  • ******
  • Posts: 1632
Re: Deleting cache files
« Reply #4 on: March 15, 2011, 08:10:27 PM »
You can also add to this to delete world cache files if your computer uses them by adding lines to it, copying and pasting the script, and following the path to those files.

For now, I have put them in a separate file (but I tested it and it works) since I don't play them often.  But as I'm not familiar with how these things work in windows programming, what happens if the script goes to delete a file that isn't actually there?  Will it create an error, or will the system just ignore that line?

It seems to just ignores the line. I ran it with the files already deleted and it just goes on through and starts the game. No error messages
A clear conscience is usually a sign of a bad memory.

Offline Hosfac

  • Sleeper Agent
  • Watcher
  • ******
  • Posts: 2433
  • Han Solo shot first.
Re: Deleting cache files
« Reply #5 on: March 15, 2011, 08:53:08 PM »
I attempted it myself and found the same thing, but thanks for checking and responding.  I'll add the extra lines for the world cache files as soon as I play those two towns and generate them.  I usually need to delete them more often than the other ones.

This was really a fantastic idea, and thanks a lot for sharing it with us!
Old forum mods never die.  We just get archived.

Interview With a Night Walker - The Veronika Beltane Story continues.

Stirus

  • Guest
Re: Deleting cache files
« Reply #6 on: March 16, 2011, 10:31:23 AM »
Sorry for the stupid question, but where are those world cache files located?



Registered members do not see ads on this Forum. Register here.

Offline TheChronicR

  • Watcher
  • ******
  • Posts: 4403
Re: Deleting cache files
« Reply #7 on: March 16, 2011, 05:57:08 PM »
Stirus, they only exist if you have worlds other than SV, Twinbrook, or Bridgeport. They are in the My Documents/Electronic Arts/The Sims 3/World Caches folder. Each world generates 2 files.
Well, that's your opinion, isn't it? And I'm not about to waste my time trying to change it. - Lady GaGa

Offline Hosfac

  • Sleeper Agent
  • Watcher
  • ******
  • Posts: 2433
  • Han Solo shot first.
Re: Deleting cache files
« Reply #8 on: March 16, 2011, 06:04:39 PM »
Sorry for the stupid question, but where are those world cache files located?

Stirus, they only exist if you have worlds other than SV, Twinbrook, or Bridgeport. They are in the My Documents/Electronic Arts/The Sims 3/World Caches folder. Each world generates 2 files.

It's also worth pointing out that some computers don't generate world cache files for those worlds.  If you don't find the folder TheChronicR mentioned, don't worry about it.  That just means that your computer doesn't use them.
Old forum mods never die.  We just get archived.

Interview With a Night Walker - The Veronika Beltane Story continues.

Offline grimsoul

  • Watcher
  • ******
  • Posts: 1632
Re: Deleting cache files
« Reply #9 on: March 16, 2011, 07:56:07 PM »
I didn't know about those cache files. Thanks for the info on them.
A clear conscience is usually a sign of a bad memory.

Offline Hosfac

  • Sleeper Agent
  • Watcher
  • ******
  • Posts: 2433
  • Han Solo shot first.
Re: Deleting cache files
« Reply #10 on: October 28, 2011, 09:03:17 PM »
Update:  While this might seem obvious to some, you can also use this little script to bypass the game launcher.  I had to do this, since installing Pets broke it.

In the last line, simply replace the name "Sims3Launcher.exe" with the name of the application that you would use to bypass the launcher.  You can find out how do do that here.
Old forum mods never die.  We just get archived.

Interview With a Night Walker - The Veronika Beltane Story continues.

Offline Pam

  • Community Manager
  • Forum Founder and Friend
  • Watcher
  • ******
  • Posts: 14791
Re: Deleting cache files
« Reply #11 on: October 28, 2011, 09:07:27 PM »
Update:  While this might seem obvious to some, you can also use this little script to bypass the game launcher.  I had to do this, since installing Pets broke it.

In the last line, simply replace the name "Sims3Launcher.exe" with the name of the application that you would use to bypass the launcher.  You can find out how do do that here.

It probably wasn't Pets that broke the launcher.  There were universal problems with it on EA's end.  Hopefully they've gotten it fixed now.
Read and heed the Forum Rules, please!

Support the site when you purchase online!
Dreamweaver Immortal Dynasty
Dreamweaver 4 x 4 Dynasty
Pam's Sims 4 World Blog

"Half of my posts are correcting people. The other 49% is moving threads."

atikin

  • Guest
Re: Deleting cache files
« Reply #12 on: November 28, 2011, 12:25:54 AM »
Can I just delete the cache folder or do I have to make an auto delete each time?  Because I don't want to.  I would prefer to only delete once.

For more info why or if you can help me, see my post in this forum under Technical Help.
HELP-Stuck Sims

loveSims

  • Guest
Re: Deleting cache files
« Reply #13 on: November 29, 2011, 08:28:55 AM »
I delete compositorChache.package and simCompositorCache.package every night when I'm finished playing. Never delete those files when stil in the game.

Frey

  • Guest
Re: Deleting cache files
« Reply #14 on: February 14, 2012, 03:55:19 PM »
I'm running Vista and I don't have a Documents and Settings folder. I googled around and foud that inseatd it was:

C:\Users\D[I think that's how I named it?]\Documents\Electronic Arts\blahblahblah

The thing is, I tried it and I get a message telling me that windows couldn't find any of the locations I typed. Does anyone know the locations for Vista?

Thanks! and thank you grimsoul for sharing this, it's such a great idea!

EDIT Apparently my computer is organized differently for some reason I don't know. I searched around a bit and found out that the right locations are these:

@echo off
del "C:\Usuarios\D\Descargas\Documentos\Electronic Arts\The Sims 3\CASPartCache.package"
del "C:\Usuarios\D\Descargas\Documentos\Electronic Arts\The Sims 3\scriptCache.package"
del "C:\Usuarios\D\Descargas\Documentos\Electronic Arts\The Sims 3\compositorCache.package"
del "C:\Usuarios\D\Descargas\Documentos\Electronic Arts\The Sims 3\simCompositorCache.package"
start /d "C:\Archivos de programa\Electronic Arts\Los Sims 3 ˇVaya Fauna!\Game\Bin" TS3EP05.exe

In english this should be something like C:\Users\D*\Downloads\Documents\Electronic Arts....... blah. But it's still unable to find anything. Please help?  :-[
*I doubt that this folder is named D in other computers, it looks like it was renamed  by me or someone else?

 

anything