Solved

Current Path

Posted on 1998-10-14
3
195 Views
Last Modified: 2010-05-18
Delphi 1
How to get the actual Path? I should know where my .exe is in the directory..

Thanx Choli
0
Comment
Question by:Choli100298
3 Comments
 

Accepted Solution

by:
dotan earned 20 total points
ID: 1342799
ExtractFilePath(ParamStr(0))
0
 
LVL 1

Expert Comment

by:BlackDeath
ID: 1342800
or:
sStartUpPath := ExtractFilePath(Application.ExeName);

and for the current directory use the API-function

GetCurrentDirectory(bufLength, buf);

with bufLength specifying the size of the buffer you will receive the directory in and
buf the address of the above mentioned buffer

- dotan:
you've been about 1 ms faster than me; the same second i tried to post this, the answer was auto-rejected from the system and so i post this comment.
this just as declaration why i post the same as you; it's not because i didn't read your answer...

;-)))

byebye,

Black Death.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1342801
hi choli,

all are faster than me

your_string_var := ExtractFilePath(ParamStr(0));

meikl
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

828 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