- 46,314 views, 3 today
- 15
- 10
- 32
53
Note that this only works for Windows PCs.
The .minecraft folder is the folder is where all your Minecraft data, including resource packs, worlds, and versions, are stored. The default location of this folder is "C:\Users\youruser\Appdata\Roaming\.minecraft".
Changing the "Game Directory" option in the Minecraft launcher only puts your saves, resource packs and versions in the specified directory. This is a method that will put your entire .minecraft folder in a specified directory. This allows you to change all your Minecraft files to wherever you want on your computer. This also allows you to have Minecraft on a portable USB!
Prerequisites:
Instructions:
1. Create a new text document and put it anywhere. To make things easier, it is recommended that you create the file in the same directory as your Minecraft.exe file.
2. Open the text document and type this line:
"path to Minecraft.exe" --workDir "path to .minecraft folder"

A windows path can tell your computer to look for a certain folder or file. For example, for most people the default location of their .minecraft folder is "C:\Users\youruser\Appdata\Roaming\.minecraft" If your Minecraft.exe file is on your desktop, the path to that would be "C:\Users\youruser\Desktop\Minecraft.exe".
Change "path to Minecraft.exe" to where your Minecraft.exe file is, and change "path to .minecraft folder" to the desired location of your .minecraft folder. Your desired Minecraft folder MUST be named ".minecraft", or this method will not work.
Here is an example file I created:
![How to change your entire Minecraft directory - create a portable Minecraft USB [Advanced Guide]](https://i.gyazo.com/8d70afe20dffb34611577a007a670fcd.png)
As you can see, my Minecraft.exe file is located in a folder on my desktop called "Minecraft", while my .minecraft folder is also in the same folder.
3. Click "file", then "Save as". In the file type section, select "all files" or "batch file" and rename the file to "start.bat". You can save this file anywhere you want. Click save. Make sure that the file is a batch file and the icon is those two little gears. If not, change the file extension to ".bat". You can now delete the original text document you created. Note that the file does not need to be named "start.bat", you can name it to anything you want, as long as it is a batch file.
4. Double click the batch file, and after a while you should see the launcher start up. In the profile settings, the game directory should be automatically set to your .minecraft folder.
5. Run Minecraft and enjoy! If it doesn't work, please leave a comment.
Additional Tips for a Portable Minecraft USB:
Hope this helped :)
The .minecraft folder is the folder is where all your Minecraft data, including resource packs, worlds, and versions, are stored. The default location of this folder is "C:\Users\youruser\Appdata\Roaming\.minecraft".
Changing the "Game Directory" option in the Minecraft launcher only puts your saves, resource packs and versions in the specified directory. This is a method that will put your entire .minecraft folder in a specified directory. This allows you to change all your Minecraft files to wherever you want on your computer. This also allows you to have Minecraft on a portable USB!
Prerequisites:
- You are using a PC, not a MAC
- You are using the alternative download version of Minecraft, the "Minecraft.exe" file. Note that Minecraft.exe can be obtained by clicking "alternative download" here.
Instructions:
1. Create a new text document and put it anywhere. To make things easier, it is recommended that you create the file in the same directory as your Minecraft.exe file.
2. Open the text document and type this line:
"path to Minecraft.exe" --workDir "path to .minecraft folder"
What is a "path""?

A windows path can tell your computer to look for a certain folder or file. For example, for most people the default location of their .minecraft folder is "C:\Users\youruser\Appdata\Roaming\.minecraft" If your Minecraft.exe file is on your desktop, the path to that would be "C:\Users\youruser\Desktop\Minecraft.exe".
Change "path to Minecraft.exe" to where your Minecraft.exe file is, and change "path to .minecraft folder" to the desired location of your .minecraft folder. Your desired Minecraft folder MUST be named ".minecraft", or this method will not work.
Here is an example file I created:
![How to change your entire Minecraft directory - create a portable Minecraft USB [Advanced Guide]](https://i.gyazo.com/8d70afe20dffb34611577a007a670fcd.png)
As you can see, my Minecraft.exe file is located in a folder on my desktop called "Minecraft", while my .minecraft folder is also in the same folder.
3. Click "file", then "Save as". In the file type section, select "all files" or "batch file" and rename the file to "start.bat". You can save this file anywhere you want. Click save. Make sure that the file is a batch file and the icon is those two little gears. If not, change the file extension to ".bat". You can now delete the original text document you created. Note that the file does not need to be named "start.bat", you can name it to anything you want, as long as it is a batch file.
What is a batch file?
This file uses Windows' "batch" scripting to run your Minecraft.exe file, using the --workDir option to change your game directory to the .minecraft folder you want.
4. Double click the batch file, and after a while you should see the launcher start up. In the profile settings, the game directory should be automatically set to your .minecraft folder.
5. Run Minecraft and enjoy! If it doesn't work, please leave a comment.
Additional Tips for a Portable Minecraft USB:
- Your USB may change the drive letter when plugged into different computers. Because of this, your Minecraft.exe file and .minecraft folder must be in the same folder or a sub-folder of your batch file.
- You cannot use drive letters for the paths in your batch file. Reference the files directly.ExampleMy USB looks like this:
My Minecraft.exe and .minecraft are located in the "Data" folder. This is what my batch script (Minecraft.bat) looks like: - You can literally plug this USB in to ANY computer running Windows and play Minecraft. Even a school computer
Hope this helped :)
Tags |
5 Update Logs
Update #5 : by Leomelonseeds 12/28/2022 4:06:40 amDec 28th, 2022
- Fixed a typo in the file path name
LOAD MORE LOGS
3808366
6
Create an account or sign in to comment.
In case anyone else is looking for this specifically, do the same thing with the .bat file but change the compatibility (found by right clicking and going to properties) to Windows XP service pack 2. I had to fiddle with things in the launcher a bit after that but I don't remember exactly but that's the main thing.
you can also go to %appdata%\.minecraft\
and also, it's not "C:Users\youruser\Appdata\Roaming\.minecraft" it's "C:\Users\youruser\Appdata\Roaming\.minecraft"