logo-150-height

Automatically deleting Sims 4 Gallery cache files

Ever noticed that the cache folder in your Documents > Electronic Arts > Sims 4 folder gets swamped with small .jpg files after you’ve played your game?

Finder window

That’s because the game has downloaded thumbnails of Gallery items into the cache folder 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 these annoying .jpg files.

One way to get rid of them is to simply trash the cache folder 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:

  1. Go into your Applications folder and open Automator Automator Icon
  2. Click on Folder Action from the options then click Choose: Folder Action 
  3. 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: Shell Script
  4. 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.
  5. In the Run Shell Script command delete cat and copy and paste the following:

    rm Documents/Electronic\ Arts/The\ Sims\ 4/cache/*.*

  6. 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: Run Shell Script Success If you get the following error message: Shell Script Error 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.
  7. Go to File > Save to save the Folder Action. You can call it what you like: Save File Name
  8. That’s it, finished. Now whenever you access the Gallery in your game the contents of the cache folder 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) and navigating to Workflows > Folder Actions and deleting the workflow you just created.
Advertisements

One thought on “Automatically deleting Sims 4 Gallery cache files

  1. Pingback: Delete all the bloated Gallery cache files in Sims 4 instantly | Bluebellflora

Leave a reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s