Minecraft Blogs / Tutorial

How to change your entire Minecraft directory - create a portable Minecraft USB [Advanced Guide]

  • 32,086 views, 30 today
  • 10
  • 8
  • 26
Leomelonseeds avatar Leomelonseeds
Level 62 : High Grandmaster Engineer
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!

  • 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.

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""?
Windows command line 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]
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.
    My USB looks like this:
    How to change your entire Minecraft directory - create a portable Minecraft USB [Advanced Guide]

    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 :)

4 Update Logs

Update #4 : 12/29/2020 1:59:28 amDec 29th, 2020

- Failed to find a suitable method for Mac, removed the text from the introduction.
- Fixed the hyperlink for Minecraft launcher alternative download, since they changed it.

Create an account or sign in to comment.

09/23/2019 11:07 pm
Level 1 : New Miner
Kid_Vegeta avatar
This worked for me! Thanks, Leomelonseeds!
09/29/2019 1:35 pm
Level 62 : High Grandmaster Engineer
Leomelonseeds avatar
No problem, glad I could help
07/01/2019 9:48 am
Level 1 : New Crafter
AlSh_7i avatar
Can I launch the Minecraft.exe by itself after I launched the start.bat?
07/01/2019 3:28 pm
Level 62 : High Grandmaster Engineer
Leomelonseeds avatar
Sorry, you must use the start.bat every single time.
06/28/2019 5:59 am
Level 1 : New Miner
Blyatman avatar
When i try to play the 1.14.3 version and click play it doesnt launch any fix for this?
06/28/2019 4:00 pm
Level 62 : High Grandmaster Engineer
Leomelonseeds avatar
Any errors? They recently updated the launcher for 1.14.3 so I will have to find a fix for this.
08/08/2019 5:57 am
Level 1 : New Crafter
SirPopa avatar
Have you figured out a work around or is it just not going to work?
08/08/2019 6:13 am
Level 1 : New Crafter
SirPopa avatar
06/29/2019 2:07 pmhistory
Level 1 : New Miner
Blyatman avatar
1.14.3 still works from the old launcher i know that.As for the errors though none when i go into the developer console it says this:

[20:06:40 INFO]: Launcher 3.7.0 started on windows...
[20:06:40 INFO]: Current time is Jun 29, 2019 8:06:40 PM
[20:06:40 INFO]: System.getProperty('os.name') == 'Windows 7'
[20:06:40 INFO]: System.getProperty('os.version') == '6.1'
[20:06:40 INFO]: System.getProperty('os.arch') == 'amd64'
[20:06:40 INFO]: System.getProperty('java.version') == '1.8.0_211'
[20:06:40 INFO]: System.getProperty('java.vendor') == 'Oracle Corporation'
[20:06:40 INFO]: System.getProperty('sun.arch.data.model') == '64'
[20:06:40 INFO]: JFX is already initialized
[20:06:40 INFO]: Refreshing local version list...
[20:06:40 INFO]: News is up to date!
[20:06:41 INFO]: Refreshing remote version list...
[20:06:42 INFO]: Refresh complete.
[20:06:42 INFO]: Loaded 1 profile(s); selected '(Default)'
[20:06:51 INFO]: Getting syncinfo for selected version
[20:06:51 INFO]: Queueing library & version downloads
[20:06:51 SEVERE]: An update to your launcher is available and is required to play 1.14.3. Please restart your launcher.

When i restart the launcher no update no nothing.
EDIT:It does work on all other version except 1.14.3 1.13.1 1.13.3
06/07/2019 12:31 am
Level 1 : New Miner
snowtoot avatar
Hello! I know this post is old, but I was hoping that you could answer a question. I just tried this, and everything works perfectly except for one thing. When I boot up the game with the .exe in the folder, it doesn't use the directory I set. Or at least if it does, I can't see all of my versions and profiles. However, when I boot up the launcher using the .bat file you had us create, it works like a charm. Is there any way to get it to work properly when I use the .exe too?

Again, this is a small thing because it works as is. I was just hoping to be able to get my shortcut on my taskbar to function as it did in the past. I already changed the path of the shortcut as well.
Planet Minecraft


© 2010 - 2021