The code below works well when testing for a valid directory using gfortran (on Linux). Trying the same code using FTN95 the inquire does not work to test for a directory.
Question: Does inquire only works for files? Which other possibilties exist to test for a valid directory using standard Fortran.
program directory
implicit none
character(len=256) :: dir,sys_cmd
logical :: test_for_dir
dir = 'C:\\temp\\test_dir'
inquire(file=dir,exist=test_for_dir)
if (.not.test_for_dir) then
sys_cmd = 'mkdir '//TRIM(dir)
write(*,*) TRIM(sys_cmd)
call SYSTEM(sys_cmd)
else
write(*,*) 'Save files in '//TRIM(dir)
endif
end program directory