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

Offline Seabody

  • Global Moderator
  • Watcher
  • ******
  • Posts: 5071
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.



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

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: 1632
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: 38
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: 5071
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: 1632
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.



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

Offline donatello

  • "Dreamin' dreams to oneday carve in stone..." - Prime Circle
  • Occult
  • ****
  • Posts: 496
  • 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: 162
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: 5071
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

  • Nooboo
  • *
  • 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: 2501
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

  • Global Moderator
  • Watcher
  • ******
  • Posts: 4827
    • 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: 290
Re: Deleting cache files
« Reply #44 on: November 29, 2013, 02:58:49 AM »
Seconding the request for coding for the TMP files. Thanks!!

 

anything