Well, without using any string functions, you could try something like this, I suppose.
Code:
#include <stdio.h>
int main(void) {
char pathname[256] = "./vehicle_database/Ford/Mondeo 2006 Handbrake";
char *charFind = NULL;
printf("%s\n", pathname);
int i;
for(i = 0; pathname[i] != '\0'; i++)
if(pathname[i] == '/')
charFind = &(pathname[i]);
*charFind = '\0';
printf("%s", pathname);
return 0;
}
I hope there is no real mistakes in there, I'm kinda tired. I did skimp a bit on error checking, though, so you might want to be more careful in a real implementation. You'll likely find a better method using strtok or some other functions, but this should give you an idea of what you *can* do.
EDIT: You might as well use OnionKnight's solution as I need to spruce up on my ANSI C syntax.