Dir path in "OpenDialog"

How can I get Dir path and filename to save them in editDIR.TEX & editFILE.TEXT

EXAMPLE

editDIR.TEXT:='C:\DATA';
editFILE.TEXT:='sal';
sal1150Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Ivanov_GConnect With a Mentor Commented:
procedure TForm1.Button1Click(Sender: TObject);
begin
  if OpenDialog1.Execute then
    begin
      editDIR.Text  := ExtractFileDir(OpenDialog1.FileName);
      editFILE.Text := ExtractFileName(OpenDialog1.FileName);
    end;
end;
0
 
esoftbgCommented:
 if OpenDialog1.Execute then
  begin
    editDIR.TEXT:= ExtractFileDir(OpenDialog1.FileName);
    editFILE.TEXT:= ExtractFileName(OpenDialog1.FileName);
  end;
0
 
Melih SARICAIT ManagerCommented:
editDIR.TEXT:=extractfilepath(opendialog1.filename);
editFILE.TEXT:=extractfilename(opendialog1.filename);
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Melih SARICAIT ManagerCommented:

i know .. i must not  answer that phone... :p
0
 
Ivanov_GCommented:

   non_zero: buy yourself handsfree .... :)))))
0
 
kretzschmarCommented:
a nice race :-))
0
All Courses

From novice to tech pro — start learning today.