🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Filename problem

#2019
From: Robert G. Hoover
Date: Thu, 10 May 2007 17:38
54 lines
2350 bytes
Hi Pat,

I have the same problem. You gotta know (or guess) where to look.

Look up "SysUtils" in the BCB help files. There are a LOT of goodies in there...

ExtractFilePath
ChangeFileExt
ExtractRelativePath
ExcludeTrailingPathDelimiter

...just to name a few. These little gems save me a LOT of time!

Rob



Pat wrote:
> Thanks Rob,
> 
> That is exactly what I was looking for! Just as a side note I looked
> high and low for this answer, all of my reference books and on line help
> and so on.  10 seconds with someone who know something......
> 
> Thank you ever so much
> Pat
> 
> Robert G. Hoover wrote:
>> Is this what you're asking for or did I misunderstand your question...?
>>
>> Edit1->Text = ExtractFileName(OpenDialog->FileName);
>>
>>
>> Rob
>>
>>
>>
>> Pat wrote:
>>> Hi,
>>>
>>> Is there any way to extract the filename from an OpenDialog?  I would
>>> like to be able to put only the filename and extension into an Edit
>>> box.  When I try to use:
>>>
>>> Edit1->Text = OpenDialog->FileName;
>>>
>>> I get the pathh and all listed in the Edit box. I know that this
>>> should be easily done it's just that I can't ssem to find an answer
>>> to my searches.
>>>
>>> Thank you for your kind help.
>>>
>>> Pat
>>>
Technical Details
Message-ID: <4643587a@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <46434861@newsgroups.borland.com> <46434c02$1@newsgroups.borland.com> <46435299$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,57cef0fbcdf7b110
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Thu, 10 May 2007 13:38:00 -0400
From: "Robert G. Hoover" <not.a.real.address@anywhere.sorry>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Filename problem
References: <46434861@newsgroups.borland.com> <46434c02$1@newsgroups.borland.com> <46435299$1@newsgroups.borland.com>
In-Reply-To: <46435299$1@newsgroups.borland.com>
X-Enigmail-Version: 0.94.1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 000739-1, 05/10/2007), Outbound message
X-Antivirus-Status: Not-Tested
NNTP-Posting-Host: 76.106.54.160
Message-ID: <4643587a@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1178818682 76.106.54.160 (10 May 2007 10:38:02 -0700)
Lines: 54
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail