Solved

Filename without extension

Posted on 1998-05-07
1
142 Views
Last Modified: 2010-04-06
hi,

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

So I get Label.Caption := ...
Thanks
0
Comment
Question by:hellfire052497
1 Comment
 
LVL 5

Accepted Solution

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

var
  L : integer;
  S: string;
begin
...
  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;
..
end;
Regards
Igor  
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to disable mouse scroll in a combo box field within a Delphi cxGrid 4 133
Printing problem 2 93
Multiple image collision 13 75
Firemonkey webbrowser scrollbars ? 1 39
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

773 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