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

Offline grimsoul

  • Watcher
  • ******
  • Posts: 1640
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: 2443
  • 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?

Offline grimsoul

  • Watcher
  • ******
  • Posts: 1640
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: 2443
  • 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!

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: 5964
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: 2443
  • 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.

Offline grimsoul

  • Watcher
  • ******
  • Posts: 1640
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: 2443
  • 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.

Offline Pam

  • Community Manager
  • Administrator
  • Watcher
  • ******
  • Posts: 15236
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?

Offline twallan

  • Townie
  • ***
  • Posts: 176
Re: Deleting cache files
« Reply #15 on: February 14, 2012, 04:37:18 PM »
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?

Try this :

1) Open a File Explorer window
2) Select the entry on the tree called "Computer"
3) Now in the "Search" box in the top right corner, type : simCompositorCache.package

See if that gives you the location of the file on your machine.

Good Luck. :)
NRaas Industries.  Saving Sims games from becoming doorstops since 2009.

Forum Rules

Offline Pam

  • Community Manager
  • Administrator
  • Watcher
  • ******
  • Posts: 15236
Re: Deleting cache files
« Reply #16 on: February 14, 2012, 05:05:38 PM »
@Frey:

I'm running Windows Vista, too.  The way I get to these files is by right clicking on the Start button (lower left corner), then click on Explore.  When the new window opens, I see "Favorite Links" in the upper left corner.  Right under that is Documents, Pictures, Music.  From there I double click Documents, then Electronic Arts, then Sims 3.  Then I can see the cache folders and delete them.

See if your computer is set up the same way.
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."

Frey

  • Guest
Re: Deleting cache files
« Reply #17 on: February 14, 2012, 06:34:55 PM »
Thanks.

I delete them regularly and I know where they are actually, it's just I don't know the exact route to type in the notepad and do what grimsoul suggested. When I type it I get an error message saying that the program/thingy wasn't able to find any of the routes I typed, but I have triple-checked that they are typed correctly, so I'm at a loss.  :-\

Offline Pam

  • Community Manager
  • Administrator
  • Watcher
  • ******
  • Posts: 15236
Re: Deleting cache files
« Reply #18 on: February 14, 2012, 07:44:56 PM »
Thanks.

I delete them regularly and I know where they are actually, it's just I don't know the exact route to type in the notepad and do what grimsoul suggested. When I type it I get an error message saying that the program/thingy wasn't able to find any of the routes I typed, but I have triple-checked that they are typed correctly, so I'm at a loss.  :-\

Ok, I'm sorry.  I misunderstood what you were trying to do.
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."

Offline grimsoul

  • Watcher
  • ******
  • Posts: 1640
Re: Deleting cache files
« Reply #19 on: February 14, 2012, 08:04:35 PM »
Thanks.

I delete them regularly and I know where they are actually, it's just I don't know the exact route to type in the notepad and do what grimsoul suggested. When I type it I get an error message saying that the program/thingy wasn't able to find any of the routes I typed, but I have triple-checked that they are typed correctly, so I'm at a loss.  :-\

I'm not running Vista so not sure if this would work the same as Windows 7 but to get the route to put in notepad try going to the file you want the path for and right click on it and select properties and see if it gives you the route there. If it does you should be able to select it and copy and past it to notepad.

A clear conscience is usually a sign of a bad memory.

Frey

  • Guest
Re: Deleting cache files
« Reply #20 on: February 14, 2012, 11:01:17 PM »
Thanks grimsoul!

Turns out that even though I have the spanish version of Windows Vista, and the folders are named in spanish ("usuarios" instead of "users, for example) the route to the files are in english. So, the route I had written was right.... but in the wrong language  ???

Now it works! My sims, my computer and I will really appreciate this  ;D

Offline MoonsAreBlue

  • Infatuated Fanatic
  • Watcher
  • ******
  • Posts: 1444
Re: Deleting cache files
« Reply #21 on: April 03, 2012, 11:11:48 AM »
Okay, I'm having some trouble doing this. I'm running Windows 7, but I can't seem to save it as a .bat file. It just saves as CleanSims.bat.txt. I'm not exactly sure what I'm doing wrong. :-\ Could somebody help me?

Offline wednesday21

  • Lurker
  • Occult
  • ****
  • Posts: 339
  • Joker is slightly amused.
Re: Deleting cache files
« Reply #22 on: April 03, 2012, 12:41:19 PM »
Okay, I'm having some trouble doing this. I'm running Windows 7, but I can't seem to save it as a .bat file. It just saves as CleanSims.bat.txt. I'm not exactly sure what I'm doing wrong. :-\ Could somebody help me?

Can you delete the .txt part when renaming the file? It should give you a message that doing so will cause the file to not work properly, but that is not a problem, since that's exactly what you're aiming for - to change its extension to .bat.

Offline MoonsAreBlue

  • Infatuated Fanatic
  • Watcher
  • ******
  • Posts: 1444
Re: Deleting cache files
« Reply #23 on: April 03, 2012, 12:46:51 PM »
No, it's really strange. I copied the text to a text document and name dit CleanSims.bat. Then I reopened it and clicked Save As. It showed up as CleanSims.bat, but when I save it, it says there's already a file named CleanSims.bat.txt. But it doesn't show the .txt extension when it saves. I think it's just a Windows 7 thing, but I don't know to fix it.

Offline wednesday21

  • Lurker
  • Occult
  • ****
  • Posts: 339
  • Joker is slightly amused.
Re: Deleting cache files
« Reply #24 on: April 03, 2012, 02:06:35 PM »
That's not what I meant. It won't work that way anyway. You should rename the already created file. Right-click on it and choose "rename" from the list, then delete the .txt part at the end.

Did you do that and did it not work again?