STEAM game cache mover

Anything about HL, HL2, Source, STEAM, or any other HL2 based games like Portal etc.
(TF2 still gets its own special one at the moment)
User avatar
Mort
Alpha-Forum Whore
Alpha-Forum Whore
Posts: 4232
Joined: Thu Dec 01, 2005 10:40 pm

STEAM game cache mover

Postby Mort » Sat Sep 17, 2011 7:06 pm

After the post where Piers was discussing hardware upgrades and the ideas about using an SSD drive as the primary drive for speed, I was left thinking. This raised the issue regarding the STEAM cache size and how it can be too big to even fit on the SSD! I decided to look for a solution. I couldn't find anything other than some basic suggestions, but nothing that was simple and convenient.

So... I wrote this
steamlink.zip


Basically, just extract this small script and save it to somewhere handy and/or create a shortcut. Edit it to change the location of your current Steam cache directory, and the path to the other drive/directory you would like to use to use as your "alternate cache". If there are spaces in your directory names make sure to put them in quotes. So you can leave your Steam cache in the default location on your "fast" C: and set the alternate cache to your slower D: drive. All the games will still work regardless of which place they are in.

What does it do?
Essentially it moves the chosen game directory to the alternate cache location and then create a "junction point" in the original location that points to the new location. Anything looking in the original spot for the files doesn't even know they have moved and they still "appear" to be in the same place.

Example:
  1. You install Steam to the default location on your C: drive. This is where you have your OS installed and would be the "fastest" drive in your computer.
  2. You have another larger (but possibly slower) drive installed D:
  3. On the D: drive, create a directory D:\steamcache
  4. Edit the script to specify "D:\steamcache" as your alternative cache
  5. Run the script and type the name of the game directory you want to move to your D:
  6. Only the game directory you select will be moved, so you can choose to keep your larger and most played games on the fast drive and move all the others to the "slow" drive

This can also work in reverse. For example if you install a new faster drive as D: and without wanting to reinstall Windows and apps etc. You can instead just move the games you play most often to the alternative cache location.

There are a bunch of checks in place to make sure you can't do something wrong, but I can't test every possible scenario, so use at your own risk. I've tested it on a few of my Steam games and they all still work fine.

Any questions, let me know.
You do not have the required permissions to view the files attached to this post.
Image

User avatar
Piers
Comfortable with my sexuality
Comfortable with my sexuality
Posts: 1408
Joined: Fri Dec 02, 2005 7:57 am
Location: Horse country

Re: STEAM game cache mover

Postby Piers » Sat Sep 17, 2011 11:24 pm

Nice.
I also found this for moving your enitre steam cache: http://www.ghacks.net/2010/09/02/move-s ... her-drive/
Note the first comment from Gordon - haven't tried it myself but I don't see why it wouldn't work.
Last edited by Piers on Sat Sep 17, 2011 11:31 pm, edited 1 time in total.
Image

User avatar
Mort
Alpha-Forum Whore
Alpha-Forum Whore
Posts: 4232
Joined: Thu Dec 01, 2005 10:40 pm

Re: STEAM game cache mover

Postby Mort » Sat Sep 17, 2011 11:27 pm

Moving the *entire* steam cache is pretty easy. I've done that several times since I've been using it. My script though lets you pick which individual games you want to move. That way you can have them all on a big slow drive and just keep the ones you want on the faster drive.
Image

User avatar
Mort
Alpha-Forum Whore
Alpha-Forum Whore
Posts: 4232
Joined: Thu Dec 01, 2005 10:40 pm

Re: STEAM game cache mover

Postby Mort » Sat Dec 17, 2011 12:17 pm

Here's another way to do what my script does, but for *any* folder using a GUI program

http://www.rekenwonder.com/linkmagic.htm

I plan to still have everything on my "C:" drive, but just use junction points to my new disk volume rather than having a C: and D: drive. That way I can just move things around to whichever disk I want them on, but as far as Windows and all the programs are concerned the content will always be in the same place on the C: drive.
Image

User avatar
Mort
Alpha-Forum Whore
Alpha-Forum Whore
Posts: 4232
Joined: Thu Dec 01, 2005 10:40 pm

Re: STEAM game cache mover

Postby Mort » Sat Jul 07, 2012 4:53 pm

Here's another mini script to help with getting things all setup for the script in the first post.

This assumes you have manually *moved* all the files from the games you want on the other drive from the "real" steam cache to the alt-cache location. When you run this script it will then go through all the folders in the alt-cache and create the link in the real steam cache location. You don't need to move the games you want to keep in the original location.

1. Close/exit Steam
2. *MOVE* the folders from Steamcache to altcache
3. Run steam_alllinks.cmd to generate the junction links

Then you can use the script from the first post to manage games from that point on.
You do not have the required permissions to view the files attached to this post.
Image

User avatar
DJDrDamage
Clan Pincushion
Posts: 797
Joined: Fri Dec 02, 2005 9:45 am
Location: melbourne

Re: STEAM game cache mover

Postby DJDrDamage » Mon Aug 05, 2013 11:56 am

thanks for the scripts.

just updated my C: to qn SSD and used this to get some space back.
Image

User avatar
Mort
Alpha-Forum Whore
Alpha-Forum Whore
Posts: 4232
Joined: Thu Dec 01, 2005 10:40 pm

Re: STEAM game cache mover

Postby Mort » Mon Aug 05, 2013 2:39 pm

STEAM also has the option built in now to have multiple locations for the cache, so it's worth checking that out as well.
Image

User avatar
DJDrDamage
Clan Pincushion
Posts: 797
Joined: Fri Dec 02, 2005 9:45 am
Location: melbourne

Re: STEAM game cache mover

Postby DJDrDamage » Mon Aug 05, 2013 3:16 pm

hmm. did not realise.
i will have a look now.
thanks
Image

User avatar
Piers
Comfortable with my sexuality
Comfortable with my sexuality
Posts: 1408
Joined: Fri Dec 02, 2005 7:57 am
Location: Horse country

Re: STEAM game cache mover

Postby Piers » Tue Aug 06, 2013 12:14 pm

There doesn't seem to be a mechanism for moving a game once it's installed, but you can delete your local content and reinstall to a new disk easily.
might try moving a file from one Steam library to the other manually and see if it works...
Image

User avatar
Mort
Alpha-Forum Whore
Alpha-Forum Whore
Posts: 4232
Joined: Thu Dec 01, 2005 10:40 pm

Re: STEAM game cache mover

Postby Mort » Wed Aug 07, 2013 1:19 am

That's what my cache moving script does. It let's you put the files wherever you want and creates a "link" to the new location so it appears to Windows that it is still in the same place. I move the games I'm not playing frequently to my spinning disk, and frequent games to SSD. Then move back when I need space.
Image


Return to “Half Life and STEAM”

Who is online

Users browsing this forum: CommonCrawl [Bot] and 0 guests