"Ken G. Brown" <kbrown-ee4meeah...@public.gmane.org> wrote in message 
news:p06240407c5b049e88...@[10.0.1.199]...
> MacOS X, 10.5.6, fpc 2.2.2
>
> How can I find the directory path to the executable of the currently 
> executing program from within the program?
>
> Or alternately, how can I specify the relative path to a file that is 
> located in the same folder as the application bundle for my currently 
> executing program?
>
> Using ./filename does not appear to work for me.
>
> Are there file and directory type utilities available? Where can I read up 
> on them?
>
> Thx for any tips,
> Ken G. Brown
> _______________________________________________
> fpc-pascal maillist  - 
> fpc-pascal-pd4fty7x32k2wbthl531ywd2fqjk+...@public.gmane.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>

Maybe I haven't understood you completely, but have you tried this?

MyProgramFolder := ExtractFilePath(ParamStr(0));

This should hopefully get you the folder of the currently running program 
from within the program (at least under Win32 and Linux).

cheers,
Paul 

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to