Lets say I have a function:
void split_path_file(char** p, char** f, char *pf) { //malloc and set *p to file path, malloc and set *f to file name //p
Go backwards through the string until you reach the first '\\' then set *f to everything after it and *p to everything before and the '\\'.