Not sure, but what´s about PathPart(), or FilePart();
PathPart() will return a pointer to the end of the given path excluding the commandname.
FilePart() will return a pointer to the beginning of the command.
You can copy all caracters between the beginning of the path/commandname upto PathPart(path), adding a ZERO using Lock() and CurentDir() on it and call RunCommand(FilePart(path))