Solved

Dir path in "OpenDialog"

Posted on 2004-04-27
6
385 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

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…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

832 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