Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Current Path

Posted on 1998-10-14
3
Medium Priority
?
216 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 80 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Question has a verified solution.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month21 days, 3 hours left to enroll

810 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