On , Sadovnikov Sergey (2:5020/760.14@fidonet) wrote:
> Try following case:
> void ChangeExt(char * NewName,char * OldName,char * NewExt)
> {
> char * Temp;
> strcpy(NewName,OldName); // Make copy of OldName
> Temp = strchr(NewName,'.'); // Finding dot in OldName
> if(Temp)
> strcpy(Temp,NewExt); // If dot present, cnange extention
> else
> strcat(NewName,Ext); // else adding extention to NewName
> }
Sadovnikov...
Try it with a path name like \root.dir\foo\bar\foo.bar\wumpus.txt and
you'll see some of the problems that the SNIPPETS code knows how to avoid.
;-)
--- QM v1.00
---------------
* Origin: MicroFirm : Down to the C in chips (1:106/2000.6)
|