Ever noticed that the OnlineThumbbnailCache and Cache folders in your Documents > Electronic Arts > Sims 4 folder gets swamped with small .jpg files after you’ve played your game?
That’s because the game has downloaded thumbnails of Gallery items into the onlinethumbnailcache and cache folders for faster loading. Whilst they’re not very big files individually, once you have enough of them they can soon mount up and clog up precious disk space on your Mac. If your Finder window shows All My Files by default (which it will unless you’ve changed it in Finder > Preferences) this can be doubly annoying as after a gaming session all you can see are a ton of .jpg files.
One way to get rid of them is to simply trash the contents of the folders after each game session, it is automatically recreated the next time you load your game so won’t do any harm. Or you can tell your Mac to automatically delete these files as soon as they appear so you never have to worry about them again. The easiest way to do this is to use Automator, an app which is built into OS X/macOS and can be found in your Applications folder. Here’s a video of what I’m talking about – on the right you can see my game window and next to it I have a Finder window open showing my Sims 4 > cache folder (Documents > Electronic Arts > The Sims 4 > cache):
If you would like to activate this action on your Mac simply follow these instructions below. You will need to do this twice, one for the onlinethumbnailcache folder and one for the cache folder:
- Go into your Applications folder and open Automator.
- If a Finder window opens prompting you to select a file to open just click cancel. Then click on Automator in the menu bar > File > New.
- Click on Folder Action from the options then click Choose:
- In the next window, under Library, click on Utilities. In the window next to it drag Run Shell Script over to the right hand space:
- Above the command you just moved there is a dropdown for ‘Folder Action receives files and folders added to...’ Click on the dropdrown and then Other... navigate to your Documents > Electronic Arts > The Sims 4 folder, click on cache then Choose.
- In the Run Shell Script command copy and paste the following:
rm Documents/Electronic\ Arts/The\ Sims\ 4/cache/*.*
- Click on Run in the top right corner of the window. You should hear a little chime and see green ticks popping up showing that your command has been successful: If you get the following error message: It may be because your cache folder is empty. To check, launch your game and open the Gallery. Open the cache folder in Finder and check that the thumbnails have downloaded. If they are now there run the script again. It should be successful.
- Go to File > Save to save the Folder Action. You can call it what you like:
- Repeat steps 1- 8 but instead of choosing the cache folder, choose the onlinethumbnailcache folder. For the shell script copy and paste this into the command: rm Documents/Electronic\ Arts/The\ Sims\ 4/onlinethumbnailcache/*.*
- That’s it, finished. Now whenever you access the Gallery in your game the contents of the folders will automatically be trashed without you having to do anything else. You can reverse the command by going into your Library folder (in Finder click on Go in the menu bar, hold down the Alt/Option key then click on the Library folder that appears) navigate to Workflows > Folder Actions and delete the Folder Actions you just created.