Article View: borland.public.cppbuilder.nativeapi
Article #6438Re: get the file name
From: Bob Gonder
Date: Fri, 06 May 2005 19:01
Date: Fri, 06 May 2005 19:01
12 lines
1335 bytes
1335 bytes
Danid wrote: >I have a path and I want to extract the file name. >C:\Test\myfile.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 );
Technical Details
Message-ID:
<cdfn711l3kvr2jsnic739rpb5calrch58q@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<427a4d8b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,5d486638eafd6e6f X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: get the file name Date: Fri, 06 May 2005 12:01:33 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <cdfn711l3kvr2jsnic739rpb5calrch58q@4ax.com> References: <427a4d8b$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.77.109.152 X-Trace: newsgroups.borland.com 1115406089 67.77.109.152 (6 May 2005 12:01:29 -0700) Lines: 14 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail