maybe you could try the following routine to search for the '.' from the end of the filename:
Code:
char Filename[]= "c:\\path\\file.ext";
char *BaseFileName;
strrev(Filename);
BaseFileName = strstr(Filename,"."); // search for the '.'
if (BaseFileName){
BaseFileName = (char*)(BaseFileName+1); // exclude the '.'
strcpy(Filename,BaseFileName);
}
strrev(Filename);
strcat(Filename,".bak\0");
this should work even if the filename does not include a full path
well of course there are still a bunch of ways to implement this.
anyways, hope this helps...