Solved

Filename without extension

Posted on 1998-05-07
1
139 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

746 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

13 Experts available now in Live!

Get 1:1 Help Now