PDA

View Full Version : [LF] Path for the executable


Lahey Support
08-15-2003, 12:19 AM
My Fortran exe program needs to read certain data files which are kept in
the same directory as the executable. Different users may copy the exe
program and data files to different locations. The location of these files
could/should be different from the location where the program is run from.
Is there a way to do one of the following:
* To open the data file from the exe program assuming that the default
location is the location of the exe program
* Some DOS command, which may be activated through Call System, which will
return the path leading to the exe version
* Some Lahey F95 command which will do the same
* A way to capture the command that started the exe program such that the
path could be extracted
* Some other method

I could of course solve this problem by Data Statements, but this would be
unpractical in the present context.

Help would be greatly appreciated, best regards

Birger


--------------------------------
[address removed]
Marine Technology Consulting AS
Brynsveien 96
N-1352 Kolsaas, Norway
Tel/Fax 67 131 999 / 67 13 47 09
Get to know us at: <www.mtc.no>
--------------------------------