Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 225
  • Last Modified:

Current Path

Delphi 1
How to get the actual Path? I should know where my .exe is in the directory..

Thanx Choli
0
Choli100298
Asked:
Choli100298
1 Solution
 
dotanCommented:
ExtractFilePath(ParamStr(0))
0
 
BlackDeathCommented:
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
 
kretzschmarCommented:
hi choli,

all are faster than me

your_string_var := ExtractFilePath(ParamStr(0));

meikl
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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