I was surprised to find that many other people want to change the location of minecraft ".minecraft" folder somewhere else. I personally changed it and it only took me a few minutes to do. I will walk you through the process of doing it yourself.
Windows
This will not work on windows operating systems prior to Windows 2000. With this everything you do will work automagically. Automated installers will still find minecraft just fine, you can even go into %appdata%\.minecraft and edit files there, and it will be reflected in your targeted directory.
If you currently have a .minecraft folder, you must delete or move it for this to work. I suggest you move it to wherever you want it to be. You can name it whatever you want.
Now here comes the hard part, type mklink /D ".minecraft" "(path)", where the (path) is replaced with the directory where you want it.
For example, if I want it in C:\Games\Minecraft, I would type mklink /D ".minecraft" "C:\Games\Minecraft", you must use backslashes \ here, as this is a built in windows tool and will have a fit if you use forward slashes.
The path must be a folder, and it must exist.
The quotation marks are important, especially if your desired path has spaces in it.
This command creates a symbolic link from .minecraft to your desired folder. UNDER NO CIRCUMSTANCES USE THE /H FLAG. I MEAN IT! A HARDLINK IS NOT NEEDED, DON'T USE ONE! If you have no idea what that means, feel free to ignore it.
You may now close the command prompt and play as normally. You will never have to go to %appdata%\.minecraft again.
To put it back, just navigate to %appdata%\.minecraft and delete the .minecraft folder (this will not delete any of your files). And optionally, move your folder where it now is back there, and name it ".minecraft". But without the " marks.
Linux
Most linux users already know how to do this. But as in the above.
Move or delete your .minecraft folder from ~/.minecraft as described above.
Open a console (elevation isn't required on linux, as Minecraft resides in the user directory).
Type cd ~, and press enter.
Type ln -s "(path)" ".minecraft", where (path) is replaced with the directory where you want the game.
For example, if I want it in ~/games/minecraft, I would type ln "~/games/minecraft" ".minecraft", in the case of linux you must use forward slashes / here, as linux wants forward slashes (windows is the weird one).
The path must be a folder, and it must exist. Well it doesn't have to be, but if it isn't, it won't work.
The quotation marks are important, especially if your desired path has spaces in it.
You may now close the console, and play as normally.
Mac OS X
As linux, however the minecraft directory is located at ~/Library/Application Support/minecraft. You type cd ~/Library/Application Support and then ln -s "(path)" "minecraft" instead. It may require an elevated console, I am not sure as I have never used Minecraft on Mac OS X.
Excellent Tutorial! Your tutorial gives us yet another way to have Minecraft in a different location, a way that is actually compatible with Automated Installers and such, as you said. I will keep this method in mind now, thank you.
Just in case anyone is looking for a way to have multiple parallel installs of Minecraft instead of just one, or in addition to a core one, the following method linked below should work at the same time as the one in the OP above. You can use the OPs method for a core install of Minecraft in an alternate location then use the following method to keep even more fully separated installs wherever you wish. I use this method to preserve original complete old versions of minecraft installed and quickly accessible as well as to keep modded versions of the game, even with the newer Launcher, in completely separate install folders so that there are no issues or mix-ups.
In fact; I will very likely start using OPs method to "move" the default core location into my current alternate master Minecraft Meta-Folder. This will make it easier for me to keep track of and access ALL possible Minecraft locations on my system. Thank you chasesandrgn!
Windows
This will not work on windows operating systems prior to Windows 2000. With this everything you do will work automagically. Automated installers will still find minecraft just fine, you can even go into %appdata%\.minecraft and edit files there, and it will be reflected in your targeted directory.Linux
Most linux users already know how to do this. But as in the above.Mac OS X
As linux, however the minecraft directory is located at ~/Library/Application Support/minecraft. You type cd ~/Library/Application Support and then ln -s "(path)" "minecraft" instead. It may require an elevated console, I am not sure as I have never used Minecraft on Mac OS X.Just in case anyone is looking for a way to have multiple parallel installs of Minecraft instead of just one, or in addition to a core one, the following method linked below should work at the same time as the one in the OP above. You can use the OPs method for a core install of Minecraft in an alternate location then use the following method to keep even more fully separated installs wherever you wish. I use this method to preserve original complete old versions of minecraft installed and quickly accessible as well as to keep modded versions of the game, even with the newer Launcher, in completely separate install folders so that there are no issues or mix-ups.
In fact; I will very likely start using OPs method to "move" the default core location into my current alternate master Minecraft Meta-Folder. This will make it easier for me to keep track of and access ALL possible Minecraft locations on my system. Thank you chasesandrgn!
-- How to have multiple full Installs of Minecraft on same Windows system --
- The Cubic Chunks Mod is back! Be a part of it's rebirth and Development.
-- Robinton's Mods: [ Mirror ] for some of his Mods incl Cubic Chunks Mod, due to DropBox broken links.
- Dungeon Generator for the Open Cubic Chunks Mod
- QuickSAVE-QuickLOAD for the Open Cubic Chunks Mod