🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
5 messages
5 total messages Started by Pat Thu, 10 May 2007 16:29
Filename problem
#2015
Author: Pat
Date: Thu, 10 May 2007 16:29
14 lines
1202 bytes
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 
Re: Filename problem
#2017
Author: Robert G. Hoover
Date: Thu, 10 May 2007 16:44
26 lines
1586 bytes
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 
> 
> 
Re: Filename problem
#2018
Author: Pat
Date: Thu, 10 May 2007 17:13
36 lines
1881 bytes
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 
>>
>>
Re: Filename problem
#2019
Author: 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
>>>
Re: Filename problem
#2033
Author: Pat
Date: Fri, 11 May 2007 17:56
62 lines
2462 bytes
Hey thanks Rob,

That really helps!

Pat


Robert G. Hoover wrote:
> 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
>>>>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads