Like in another function, use `MCString*` functions to create the appropriate substring - `MCCmd` without the characters after the last `/` - and convert it to a `char*` afterwards.