Solved

Current Path

Posted on 1998-10-14
3
190 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 94
System restore point 4 91
proper way to parse text with delphi 7 101
RESTRequest Parameter 4 14
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…
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

895 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now