Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

program path to variable

Status
Not open for further replies.

matan

Programmer
Mar 22, 2001
1
IL
how do i get the path of my program ( the location of it ) into a var ? for example : if the program resides on c:\1.exe
when it's launched i will get c:\1.txt into a var .

how do i do this ?
 
matan,

There are two ways you can do this, both involve using the extractFilePath() function on either of the following:

1. ParamStr( 0 )
2. Application.ExeName

I prefer the former because it tends to involve fewer runtime BPL's, however, your mileage may vary.

For details, please see the online help on these methods.

Hope this helps...

-- f
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top