BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Filename problem

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Native API)
View previous topic :: View next topic  
Author Message
Pat
Guest





PostPosted: Thu May 10, 2007 9:29 pm    Post subject: Filename problem Reply with quote



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
Back to top
Robert G. Hoover
Guest





PostPosted: Thu May 10, 2007 9:44 pm    Post subject: Re: Filename problem Reply with quote



Is this what you're asking for or did I misunderstand your question...?

Edit1->Text = ExtractFileName(OpenDialog->FileName);


Rob



Pat wrote:
Quote:
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

Back to top
Pat
Guest





PostPosted: Thu May 10, 2007 10:13 pm    Post subject: Re: Filename problem Reply with quote



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:
Quote:
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

Back to top
Robert G. Hoover
Guest





PostPosted: Thu May 10, 2007 10:38 pm    Post subject: Re: Filename problem Reply with quote

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:
Quote:
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
Back to top
Pat
Guest





PostPosted: Fri May 11, 2007 10:56 pm    Post subject: Re: Filename problem Reply with quote

Hey thanks Rob,

That really helps!

Pat


Robert G. Hoover wrote:
Quote:
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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Native API) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.