🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #16810

Filename problem solved!

#16810
From: Frank Eid
Date: Thu, 24 Apr 2003 21:14
13 lines
1245 bytes
I've been puzzled for a while with the fact that there is no
'ExtractFileName' - type of function in the VCL that actually returns the
name of a file WITHOUT the extension part.

The solution is:

AnsiString as,fn;

as = "C:\\mydir\\myfile.ext"
fn = ExtractFileName(as);    // Get's "myfile.ext"
fn = ChangeFileExt(fn,"");    // Get's "myfile"

Frank
Technical Details
Message-ID: <3ea85256$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,72b0c0166f06175b,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-04-24 14:13:56 PST
From: "Frank Eid" <frank@spi.no>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Filename problem solved!
Date: Thu, 24 Apr 2003 23:14:45 +0200
Lines: 16
Organization: SystemPartner Int
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
NNTP-Posting-Host: 193.216.80.150
Message-ID: <3ea85256$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1051218518 193.216.80.150 (24 Apr 2003 14:08:38 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail