 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Danid Guest
|
Posted: Thu May 05, 2005 4:44 pm Post subject: get the file name |
|
|
I have a path and I want to extract the file name.
C:Testmyfile.jpg I want to have myfile.jpg
Thanks,
|
|
| Back to top |
|
 |
Bob Gonder Guest
|
Posted: Fri May 06, 2005 7:01 pm Post subject: Re: get the file name |
|
|
Danid wrote:
| Quote: | I have a path and I want to extract the file name.
C:Testmyfile.jpg I want to have myfile.jpg
|
Look at the C functions fnsplit() and fnmerge().
char file[MAXPATH], ext[MAXPATH];
char fullpath[]="C:\Test\myfile.jpg";
char filename[MAXPATH];
fnsplit( fullpath, NULL, NULL, file, ext );
fnmerge( filename, NULL, NULL, file, ext );
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|