Cooking from cmd - UE doesn't see maps

Hello there!

The problem might have been posted already (I hope not though), but general problems with cooking are so frequent here on the Answerhub that it might be impossible to find anything for my case (most threads end up being about missing/removed assets).

I would like to cook specific maps from a project from the commandline (Windows’ cmd.exe), but every time I try to do so, UE4 will tell me that the map could not be found. Here’s an example (for Sun Temple demo):

I run UE4 from:

C:\Program Files (x86)\Epic Games\4.12\Engine\Binaries\Win64

Command looks like this:

UE4Editor-Cmd.exe C:\Users\knied\Desktop\SunTemple\SunTemple -run=cook -targetplatform=Android -map=SunTemple

And I get the following:

LogCook:Warning: Unable to find package for map SunTemple.

even though the map’s name is actually

SunTemple.umap

Has anyone encountered this one before?

Thanks in advance.

Found the issue myself, quite an embarrasing one.
UE4 won’t add .uproject by itself to project’s path, so the proper answer was actually:

UE4Editor-Cmd.exe C:\Users\knied\Desktop\SunTemple\SunTemple.uproject -run=cook -targetplatform=Android -map=SunTemple

In case anyone finds it useful - don’t type .umap to map names. Also you can be more precise with targetplatform - if you know what version of Android you will cook for, type it as well (i.e. Android_ASTC).