• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 410
  • Last Modified:

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';
0
sal1150
Asked:
sal1150
1 Solution
 
Ivanov_GCommented:
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 SARICAOwnerCommented:
editDIR.TEXT:=extractfilepath(opendialog1.filename);
editFILE.TEXT:=extractfilename(opendialog1.filename);
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
Melih SARICAOwnerCommented:

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

   non_zero: buy yourself handsfree .... :)))))
0
 
kretzschmarCommented:
a nice race :-))
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now