Can't pass an argument with a space to a console command

I’ve created a console command for the editor that takes one argument, a filename.

When the filename has no spaces in it, this works great.

When there’s a space in the filename e.g. if I type

mycommand "c:\Users\Me\Documents\Unreal Project"
My console command gets two arguments, and tells me file not found. In my case, I get a log:
mycommand: Ignoring Argument "Project"
followed by
mycommand: File not found: c:\Users\Me\Documents\Unreal.

That’s because FString::ParseIntoArrayWS splits on spaces, regardless of quotes.

Is there a workaround?

Looks like bug (but it kind of missing feature), i will move it to Bug Raports

Hey benoithudson,

This is what I have:


UFUNCTION( exec, Category = "test" )
void TestingExec( FString In );


void AAH489878Character::TestingExec( FString In )
    UE_LOG( LogTemp, Warning, TEXT("%s"), *In );    

Then, when I use the command:

Can you show me what “mycommand” is doing?


We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.