# How can you load a map from command line?

**URL:** <https://forums.unrealengine.com/t/how-can-you-load-a-map-from-command-line/443889>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4, Blueprint, question, execute-command\
**Created:** [February 21, 2019, 7:39pm UTC](https://forums.unrealengine.com/t/how-can-you-load-a-map-from-command-line/443889 "2019-02-21T19:39:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![krishcrush](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@krishcrush](https://forums.unrealengine.com/u/krishcrush)\
**Post date:** [February 21, 2019, 7:39pm UTC](https://forums.unrealengine.com/t/how-can-you-load-a-map-from-command-line/443889/1 "2019-02-21T19:39:30Z")

</div>

Hello,

I would like the player to be able to load a specific map via command line (advanced launch options in steam). I checked [Command-Line Arguments | Unreal Engine Documentation](https://docs.unrealengine.com/en-US/Programming/Basics/CommandLineArguments) and tried the following command:

```
MyGame.exe /Game/Maps/MyMap
MyGame.exe MyMap

```

But neither of them seems to work and the game just loads the default map. I also went to the packaging settings and copies across the map directory from the ‘list of maps to include in package build’ but it still didn’t work.

Any idea how I can get this command to work?

Thank you 🙂

---

<div class="post-metadata">

**Author:** ![Chyros](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chyros](https://forums.unrealengine.com/u/Chyros)\
**Post date:** [February 22, 2019, 2:46am UTC](https://forums.unrealengine.com/t/how-can-you-load-a-map-from-command-line/443889/2 "2019-02-22T02:46:26Z")

</div>

Let’s say your project is at:

```
C:\MyUE4Project

```

And your map you want to load is at (your map must be inside **Content** folder or its subfolders):

```
C:\MyUE4Project\Content\MyMaps\TestMap01

```

Then you would pass your map as (notice the suffix “ **/Game/** ”):

```
/Game/MyMaps/TestMap01

```

So you can load your game using any of the ff. command:

```
MyGame.exe /Game/MyMaps/TestMap01

```

OR

```
C:\UE4\Engine\Binaries\Win64\UE4Editor.exe C:\MyUE4Project\MyUE4Project.uproject /Game/MyMaps/TestMap01
```

---

<div class="post-metadata">

**Author:** ![PRESSURE2000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PRESSURE2000](https://forums.unrealengine.com/u/PRESSURE2000)\
**Post date:** [May 9, 2022, 10:13pm UTC](https://forums.unrealengine.com/t/how-can-you-load-a-map-from-command-line/443889/3 "2022-05-09T22:13:03Z")

</div>

will this work for dedicated servers?

---

<div class="post-metadata">

**Author:** ![Fulezi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fulezi/32/813318_2.png) [@Fulezi](https://forums.unrealengine.com/u/Fulezi)\
**Post date:** [December 6, 2024, 10:32am UTC](https://forums.unrealengine.com/t/how-can-you-load-a-map-from-command-line/443889/4 "2024-12-06T10:32:12Z")

</div>

Yes it works. E.g.:

```auto
./LinuxServer/BattleHeightServer.sh -epicapp=<REDACTED> /Game/Maps/KOTH/KOTH_ShiverbonesPeak.KOTH_ShiverbonesPeak

```
