Solved

Dir path in "OpenDialog"

Posted on 2004-04-27
6
384 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
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
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.

 
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

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

930 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

12 Experts available now in Live!

Get 1:1 Help Now