Filename without extension

Posted on 1998-05-07
Last Modified: 2010-04-06

How do I get the Filename without the extension from the opendialog1.Filename

So I get Label.Caption := ...
Question by:hellfire052497
1 Comment

Accepted Solution

inter earned 50 total points
ID: 1342774
This is the code fragment

  L : integer;
  S: string;
  S := OpenDialog1.FileName;
  L := Length(S);
  while (L > 0) and ( S[L] <> '.') do  Dec(L);
  if L <> 0 then SetLength(S, L-1);
  Label1.Caption := S;

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
System restore point 4 91
how to send memory stream from ics Client To ics server ? 11 81
Controlled Assessment GCSE - desperate help needed 4 75
Base1 Encode/Decode 3 67
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now