Solved

Dir path in "OpenDialog"

Posted on 2004-04-27
6
393 Views
Last Modified: 2010-04-16
How can I get Dir path and filename to save them in editDIR.TEX & editFILE.TEXT

EXAMPLE

editDIR.TEXT:='C:\DATA';
editFILE.TEXT:='sal';
0
Comment
Question by:sal1150
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 12

Accepted Solution

by:
Ivanov_G earned 250 total points
ID: 10929176
procedure TForm1.Button1Click(Sender: TObject);
begin
  if OpenDialog1.Execute then
    begin
      editDIR.Text  := ExtractFileDir(OpenDialog1.FileName);
      editFILE.Text := ExtractFileName(OpenDialog1.FileName);
    end;
end;
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 10929179
 if OpenDialog1.Execute then
  begin
    editDIR.TEXT:= ExtractFileDir(OpenDialog1.FileName);
    editFILE.TEXT:= ExtractFileName(OpenDialog1.FileName);
  end;
0
 
LVL 19

Expert Comment

by:Melih SARICA
ID: 10929208
editDIR.TEXT:=extractfilepath(opendialog1.filename);
editFILE.TEXT:=extractfilename(opendialog1.filename);
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Expert Comment

by:Melih SARICA
ID: 10929222

i know .. i must not  answer that phone... :p
0
 
LVL 12

Expert Comment

by:Ivanov_G
ID: 10929242

   non_zero: buy yourself handsfree .... :)))))
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 10930377
a nice race :-))
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

705 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