# Commandlet "looks like a commandlet"

**URL:** <https://forums.unrealengine.com/t/commandlet-looks-like-a-commandlet/372141>\
**Category:** Mobile\
**Tags:** error, commandlet, unreal-engine, editor, UE4, question, CPP\
**Created:** [October 1, 2016, 12:29pm UTC](https://forums.unrealengine.com/t/commandlet-looks-like-a-commandlet/372141 "2016-10-01T12:29:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![outtaspace](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@outtaspace](https://forums.unrealengine.com/u/outtaspace)\
**Post date:** [October 1, 2016, 12:29pm UTC](https://forums.unrealengine.com/t/commandlet-looks-like-a-commandlet/372141/1 "2016-10-01T12:29:43Z")

</div>

I’m trying to run the commandlet located at [GitHub - ue4plugins/CommandletPlugin: Unreal Engine 4 plug-in that demonstrates how to implement a commandlet.](https://github.com/ue4plugins/CommandletPlugin). To do this I copied it into my project as a new file however when I run the commandlet it always says “HelloWorldCommandlet looked like a commandlet, but we could not find the class.” Any help would be appreciated.

```
// Copyright 2015 Headcrash Industries LLC. All Rights Reserved.

#pragma once

#include "Commandlets/Commandlet.h"
#include "HelloWorldCommandlet.generated.h"

UCLASS()
class UHelloWorldCommandlet
	: public UCommandlet
{
	GENERATED_BODY()

public:

	/** Default constructor. */
	UHelloWorldCommandlet()
	{
		IsClient = false;
		IsEditor = false;
		IsServer = false;
		LogToConsole = true;
	}

	~UHelloWorldCommandlet()
	{

	}

public:

	//~ UCommandlet interface

	virtual int32 Main(const FString& Params) override
	{
		UE_LOG(LogTemp, Display, TEXT("Hello world!"));

		return 0;
	}
};
```

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [October 1, 2016, 5:39pm UTC](https://forums.unrealengine.com/t/commandlet-looks-like-a-commandlet/372141/2 "2016-10-01T17:39:19Z")

</div>

What commandline are you using?

---

<div class="post-metadata">

**Author:** ![outtaspace](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@outtaspace](https://forums.unrealengine.com/u/outtaspace)\
**Post date:** [October 2, 2016, 1:46am UTC](https://forums.unrealengine.com/t/commandlet-looks-like-a-commandlet/372141/3 "2016-10-02T01:46:44Z")

</div>

I’ve got a .bat

> “C:\Program Files\Epic Games\4.12\Engine\Binaries\Win64\UE4Editor-cmd.exe” “C:\Games\ArchV” -run=HelloWorld

that I just run in a standard command prompt on windows 7.

 ![109326-commandleterror.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/d/c/3dc6c6dfa1c2d92df486a50f92657d6fe8638fe0.png)

on a second look I wonder if it’s not loading my project so it can’t find the class, however if i change Argv[1] from “C:\Games\ArchV” to “C:\Games\ArchV\ArchV.uproject” it throws an error saying it can’t find the map specified.

A bit of Background: I’m trying to build a script to batch import models that will run on a server. So I assume it has to run through the editor. I am also running unreal off the Epic Games Launcher.

 ![109327-log.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/a/2/9a2b980c99b39a771b7ef4ba6aba82343965cb73.png)

![109328-error+message.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/9/b/f9b44a7f25a5214b6de60e49b8a4bd35e369914a.png)

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [October 2, 2016, 12:44pm UTC](https://forums.unrealengine.com/t/commandlet-looks-like-a-commandlet/372141/4 "2016-10-02T12:44:23Z")

</div>

Yeah, I was also thinking it might not be loading your project, and that does seem to be the case.

I tried this myself locally and as long as the .uproject is the first argument, it should be treated as a project rather than a map.

Is your project definitely built for the correct editor config? Bear in mind that without “-debug” on the commandline, it’ll be trying to load the “Development Editor” rather than “Debug Editor”/“DebugGame Editor” build of your game.

Also, just to rule out any bat weirdness, does the same thing happen if you run that command directly in cmd?

---

<div class="post-metadata">

**Author:** ![outtaspace](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@outtaspace](https://forums.unrealengine.com/u/outtaspace)\
**Post date:** [October 2, 2016, 1:02pm UTC](https://forums.unrealengine.com/t/commandlet-looks-like-a-commandlet/372141/5 "2016-10-02T13:02:37Z")

</div>

I’m relatively new to compiling the C++ in unreal. I just downloaded the launcher from epic games created a new project, added in the file I wrote above and pressed compile. I just tried setting it from development to debug in the editor and that didn’t help. I also tried changing to “DebugGame Editor” in vs2015 and still ran into the same error.

---

<div class="post-metadata">

**Author:** ![outtaspace](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@outtaspace](https://forums.unrealengine.com/u/outtaspace)\
**Post date:** [October 10, 2016, 3:29am UTC](https://forums.unrealengine.com/t/commandlet-looks-like-a-commandlet/372141/6 "2016-10-10T03:29:43Z")

</div>

Ended up downloading 4.13 from github and so far it seems to be running fine.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1d70cb8f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1d70cb8f](https://forums.unrealengine.com/u/anonymous_user_1d70cb8f)\
**Post date:** [August 2, 2019, 2:24pm UTC](https://forums.unrealengine.com/t/commandlet-looks-like-a-commandlet/372141/7 "2019-08-02T14:24:47Z")

</div>

Can i ask how did you slove your problem in the final?I have run the code in ue4.18,but it dosen’t work,still the same problem as above.Thanks a lot!
