The folder containing my main executable is very cluttered with input, output and source files. I would like to move some of these files into a different directory to my executable but still be able to access them. It would be fantastic if I could make a directory, for example ./main/outfile, that holds all the output files from my program. Is it possible to include a path when accessing these files in Fortran 77/90?
If compilers are of any importance, I use gfortran which is running on Ubuntu 11.10.
for input/output files, just specify the path when you are opening the file. For example:
will open a file in the
outputdatafolder. Note that theoutputdatafolder has to exist beforehand, or you will likely get an error.