Author Topic: Create a batch file to delete game cache files  (Read 60787 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: 2445
  • 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: 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: 2445
  • 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: 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: 2445
  • 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: 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: 2445
  • 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
  • Administrator
  • Watcher
  • ******
  • Posts: 15235
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: 15235
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: 15235
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?

Offline grimsoul

  • Watcher
  • ******
  • Posts: 1640
Re: Deleting cache files
« Reply #25 on: April 03, 2012, 04:44: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?

When you go to save it are you going in the Save as Type drop down menu and changing from .txt files to All Files? If you don't do that is will add the .txt to the file name.
A clear conscience is usually a sign of a bad memory.

Offline MoonsAreBlue

  • Infatuated Fanatic
  • Watcher
  • ******
  • Posts: 1444
Re: Deleting cache files
« Reply #26 on: April 03, 2012, 06:51:19 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?

When I rename it, only the name shows up, not the extension.

When you go to save it are you going in the Save as Type drop down menu and changing from .txt files to All Files? If you don't do that is will add the .txt to the file name.

That's exactly what I did, but it still saved it as a .txt file. There's a separate drop-down menu Encoding and the options are ANSI, Unicode, Unicode big endian, and UTF-8. ANSI is default. Should I select any of those?

Offline wednesday21

  • Lurker
  • Occult
  • ****
  • Posts: 339
  • Joker is slightly amused.
Re: Deleting cache files
« Reply #27 on: April 03, 2012, 07:00:33 PM »
Gotcha. ;) Here you go. Do that, then go back to the file, rename it and erase the .txt part at the end. That should do it.

Offline grimsoul

  • Watcher
  • ******
  • Posts: 1640
Re: Deleting cache files
« Reply #28 on: April 03, 2012, 07:24:39 PM »
That's exactly what I did, but it still saved it as a .txt file. There's a separate drop-down menu Encoding and the options are ANSI, Unicode, Unicode big endian, and UTF-8. ANSI is default. Should I select any of those?

No, you shouldn't have to change it. It should be ANSI. I don't why it's not working for you.
Let's try a different route. Do you have your folders options set to Hide extensions for known file types? If so change that by
Open Folder Options by clicking the Start button, clicking Control Panel, clicking Appearance and Personalization, and then clicking Folder Options, click on the View tab find the option for Hide extensions for known file types. If there is a check in that box click it to uncheck it then click ok.

Now go back to notepad and after putting in the info for the batch file do a save as and give it a name like Clean Cache and leave everything as default so it saves it as a .txt file.
Now find the file you just saved and right click it and choose rename. Replace txt with bat and hit enter and that should have you set.
I know it's a long way around to do it but I'm not sure why it's not saving right in notepad for you but this should take care of it.

edit: Looks like wednesday21 beat me to it. :)
A clear conscience is usually a sign of a bad memory.

Offline MoonsAreBlue

  • Infatuated Fanatic
  • Watcher
  • ******
  • Posts: 1444
Re: Deleting cache files
« Reply #29 on: April 03, 2012, 07:27:09 PM »
Gotcha. ;) Here you go. Do that, then go back to the file, rename it and erase the .txt part at the end. That should do it.

That did it. Thank you. :)

Offline Seabody

  • Global Moderator
  • Watcher
  • ******
  • Posts: 5106
Re: Deleting cache files
« Reply #30 on: May 13, 2012, 03:07:59 AM »
start /d "C:\Program Files\Electronic Arts\The Sims 3 Ambitions\Game\Bin" Sims3Launcher.exe

Just to be sure, the quotation mark between "Bin" and "Sims3Launcher.exe" is meant to be there, and not at the end, right? :-\ I want to make my .bat file right, because, if I recall correctly, the last time I did it, I did something wrong.

Edit: I tried it and it is meant to be there.

Offline napoleonwrasse

  • Townie
  • ***
  • Posts: 111
  • I'm a long time simmer who mostly builds.
    • Sims 3 Houses and Misc. items
Re: Deleting cache files
« Reply #31 on: June 23, 2012, 04:38:41 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?

But not on a mac. It causes major issues with the text of the world. I nearly did it make Union cove work, but then double checked on another site and found how problematic it is.

Offline angelcat621

  • Happy Cat Servant
  • Llama Wrangler
  • **
  • Posts: 62
  • I'm still here everyone!
Re: Deleting cache files
« Reply #32 on: August 07, 2012, 02:42:10 PM »
In addition to the cache files mentioned in the original post, some people find that their game runs smoother when they delete the contents of the DCBackup (not DCCache, always leave that alone) folder, which is where the game stores a backup of the Store items that are installed. These are not really needed and take up a lot of space. I do this regularly and have not had any issues. Please note, however, that the ccmerged file in this folder should never be deleted if it is present. Doing so can cause Premium items, like the spellbook or deep fryer, to not function properly.
The cat is cryptic, and close to strange things which men cannot see. -H.P. Lovecraft 

Offline grimsoul

  • Watcher
  • ******
  • Posts: 1640
Re: Deleting cache files
« Reply #33 on: August 07, 2012, 04:35:54 PM »
I've 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.
I anyone has seen any files in the DCBackup folder that don't start with a number 0 let me know and I'll see if I can do it differently to take care of them.
A clear conscience is usually a sign of a bad memory.

Offline Posidem

  • Dutch of the Sea
  • Llama Wrangler
  • **
  • Posts: 51
Re: Deleting cache files
« Reply #34 on: September 22, 2012, 08:34:24 PM »
I love you. I love you so much. My game has been running a LOT smoother since I've done this. Thank you! <3

Offline Seabody

  • Global Moderator
  • Watcher
  • ******
  • Posts: 5106
Re: Deleting cache files
« Reply #35 on: September 23, 2012, 03:48:29 AM »
I anyone has seen any files in the DCBackup folder that don't start with a number 0 let me know and I'll see if I can do it differently to take care of them.

Wouldn't it be better to make ccmerged.package read-only, then wipe the rest of them? Someone else posted the code, but off the top of my head, I think it was this:

Code: [Select]
attrib +r "C:\Documents and Settings\My Computer\My Documents\Electronic Arts\The Sims 3\DCBackup\ccmerged.package"
del "C:\Documents and Settings\My Computer\My Documents\Electronic Arts\The Sims 3\DCBackup\"
attrib -r "C:\Documents and Settings\My Computer\My Documents\Electronic Arts\The Sims 3\DCBackup\ccmerged.package"

Offline grimsoul

  • Watcher
  • ******
  • Posts: 1640
Re: Deleting cache files
« Reply #36 on: September 23, 2012, 07:44:48 AM »
Wouldn't it be better to make ccmerged.package read-only, then wipe the rest of them? Someone else posted the code, but off the top of my head, I think it was this:

Code: [Select]
attrib +r "C:\Documents and Settings\My Computer\My Documents\Electronic Arts\The Sims 3\DCBackup\ccmerged.package"
del "C:\Documents and Settings\My Computer\My Documents\Electronic Arts\The Sims 3\DCBackup\"
attrib -r "C:\Documents and Settings\My Computer\My Documents\Electronic Arts\The Sims 3\DCBackup\ccmerged.package"

Yes, that will work just fine. And would take take of any files that might come up that don't start with a zero. But so far it hasn't been a problem.
Like a lot of problems they can have more than one solution. :) Just use the one that works best for you.
A clear conscience is usually a sign of a bad memory.

Offline donatello

  • "Dreamin' dreams to oneday carve in stone..." - Prime Circle
  • Immortal
  • *****
  • Posts: 506
  • Just as well my sims game is unplayable (stupid update issues!) I don't have time these days anyway.
Re: Deleting cache files
« Reply #37 on: September 25, 2012, 06:51:20 PM »
Grimsoul, you do realise you saved my PC from eating bricks for a late night snack right? Thank you so much, this is just awesome!
"Life is not worth living unless lived for someone else" - Albert Einstein
"The only history worth a tinker's dam is the history we made today" - Henry Ford
"If it feels like you have everything under control, you're simply not going fast enough" - Mario Andretti

Offline Sarabi

  • Townie
  • ***
  • Posts: 163
Re: Deleting cache files
« Reply #38 on: November 25, 2012, 09:03:05 AM »
Great idea, grimsoul.  I've been using the batch file for awhile now, and it is very helpful.

Thank you.

Offline Seabody

  • Global Moderator
  • Watcher
  • ******
  • Posts: 5106
Re: Deleting cache files
« Reply #39 on: November 27, 2012, 01:57:31 AM »
I'd like to share my personal batch file. It works on Windows 7, at least:

Code: [Select]
@echo off
del "%USERPROFILE%\Documents\Electronic Arts\The Sims 3\CASPartCache.package"
echo CASPartCache deleted
del "%USERPROFILE%\Documents\Electronic Arts\The Sims 3\scriptCache.package"
echo ScriptCache deleted
del "%USERPROFILE%\Documents\Electronic Arts\The Sims 3\compositorCache.package"
echo compositorCache deleted
del "%USERPROFILE%\Documents\Electronic Arts\The Sims 3\simCompositorCache.package"
echo simCompositorCache deleted
del "%USERPROFILE%\Documents\Electronic Arts\The Sims 3\socialCache.package"
echo socialCache deleted
del "%USERPROFILE%\Documents\Electronic Arts\The Sims 3\Thumbnails"
echo thumbnails cleared
del "%USERPROFILE%\Documents\Electronic Arts\The Sims 3\WorldCaches"
echo world cache cleaned
attrib +r "%USERPROFILE%\Documents\Electronic Arts\The Sims 3\DCBackup\ccmerged.package"
echo ccmerged made readonly
del "%USERPROFILE%\Documents\Electronic Arts\The Sims 3\DCBackup"
echo DCBackup cleaned
attrib -r "%USERPROFILE%\Documents\Electronic Arts\The Sims 3\DCBackup\ccmerged.package"
echo ccmerged made readwrite
start /d "C:\Program Files\Electronic Arts\The Sims 3 Seasons\Game\Bin" Sims3Launcher.exe
echo game launching
pause
exit

Basically it deletes every file possible (cache files, DCBackup, Thumbnails and World Caches) and then tells me that it deleted them. It then launches the game, tells me it did that, waits for confirmation, then exits. Best thing is, I don't even need to bother changing Usernames - %USERPROFILE% means your User Profile - so for instance, if my username was "Seabody", it'd mean C:\Users\Seabody - if it was "Orangutan", it'd mean C:\Users\Orangutan.

Offline only_heather

  • NPC
  • *
  • Posts: 1
Re: Deleting cache files
« Reply #40 on: October 03, 2013, 12:32:45 PM »
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



I am an IDIOT!!! I have a degree in information security, you would think I'd double check my scripts... ok
I copied this and found my file locations... however on the DCBackup.. yeah, guess what I did NOT do... I left off the 0*.package part... my CCMERGED is gone... is this bad? I am afraid to open up my game now... crap!!

Offline saltpastillen

  • Watcher
  • ******
  • Posts: 2576
Re: Deleting cache files
« Reply #41 on: October 03, 2013, 02:20:20 PM »
Can you find in in the trash can?

Otherwise you might have to reinstall all your preminum content in order for it to work properly. It might still be in game, but it will not work as before.

Offline Blackrosea

  • Immortal
  • *****
  • Posts: 575
Re: Deleting cache files
« Reply #42 on: October 03, 2013, 04:54:36 PM »


I am an IDIOT!!! I have a degree in information security, you would think I'd double check my scripts... ok
I copied this and found my file locations... however on the DCBackup.. yeah, guess what I did NOT do... I left off the 0*.package part... my CCMERGED is gone... is this bad? I am afraid to open up my game now... crap!!

Welcome to the forum only_heather. 

I personally have deleted the ccmerged.package file and have been fine with playing my game. It should be located in your trash bin if you feel better moving that file back.

Offline sdhoey

  • Challenge Board Assistant
  • Global Moderator
  • Watcher
  • ******
  • Posts: 5336
    • sdhoeys Sims & More
Re: Deleting cache files
« Reply #43 on: October 04, 2013, 09:57:52 AM »
Is there anyway to add the TMP.files to this? So that they can be deleted without deleting anything else in the DCCache folder?

Offline Niana

  • Occult
  • ****
  • Posts: 301
Re: Deleting cache files
« Reply #44 on: November 29, 2013, 02:58:49 AM »
Seconding the request for coding for the TMP files. Thanks!!

Offline Seabody

  • Global Moderator
  • Watcher
  • ******
  • Posts: 5106
Re: Deleting cache files
« Reply #45 on: November 29, 2013, 03:33:50 AM »
I don't seem to have any .tmp files in my DCCache folder, so I can't test this.

Can someone please tell me (so I can correct this if I need to), are the temp files named like this? File.tmp File2.tmp, etc? I would assume they are.

Code: [Select]
@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"
del "C:\Documents and Settings\My Computer\My Documents\Electronic Arts\The Sims 3\DCCache\*.tmp"
start /d "C:\Program Files\Electronic Arts\The Sims 3 Ambitions\Game\Bin" Sims3Launcher.exe

Offline grimsoul

  • Watcher
  • ******
  • Posts: 1640
Re: Deleting cache files
« Reply #46 on: November 29, 2013, 07:21:32 AM »
Yes, the temp files have a .tmp extension so what you have there should work fine to delete them.
A clear conscience is usually a sign of a bad memory.

Offline sdhoey

  • Challenge Board Assistant
  • Global Moderator
  • Watcher
  • ******
  • Posts: 5336
    • sdhoeys Sims & More
Re: Deleting cache files
« Reply #47 on: July 06, 2014, 08:15:43 PM »
Thank you Seabody and grimsoul. I'm gonna update mine now and try it out. I'll let you know how it works.

Offline lahaygood

  • Llama Wrangler
  • **
  • Posts: 83
Re: Deleting cache files
« Reply #48 on: August 06, 2014, 07:15:04 PM »
I have a couple questions about the cleansims.bat file and deleting the cache files.
first, when i double click, it briefly clicks open to a black background window then it disappears.  does this mean the cache files are now deleted?

second:  can I just do a search for the cache file names listed and delete them manually?
thanks!
LA
Have a Sims kinda day! 
hugs & smiles,
Annie

Offline grimsoul

  • Watcher
  • ******
  • Posts: 1640
Re: Deleting cache files
« Reply #49 on: August 06, 2014, 08:00:44 PM »
I have a couple questions about the cleansims.bat file and deleting the cache files.
first, when i double click, it briefly clicks open to a black background window then it disappears.  does this mean the cache files are now deleted?

second:  can I just do a search for the cache file names listed and delete them manually?
thanks!
LA

The window that pops up is the batch file running. So, yes the cache files should now be deleted.

And yes you can search for the files and manually delete them if you wish.  I did it that way for awhile. I just made the batch file to automate the process instead of having to do it myself every time I wanted to delete the files.
A clear conscience is usually a sign of a bad memory.

Offline lahaygood

  • Llama Wrangler
  • **
  • Posts: 83
Re: Deleting cache files
« Reply #50 on: August 06, 2014, 11:14:13 PM »
thank you bunches!  when i do the search after running the bat file, the cache file shows up.  should i just delete it completely?
thanks again!
LA
Have a Sims kinda day! 
hugs & smiles,
Annie

 

anything