Dear all,
I found the following legacy code
full_file_path_name = trim(input_dir_name) // "\" // trim( input_file_name )
call chdir(trim(input_dir_name))
inquire (file = full_file_path_name, exist = exists)
if( .not. exists ) then
is_success = .false.
essage = "Could not find file: " // trim( full_file_path_name )
return
endif
xml_doc => parseFile(trim(input_file_name), iostat = status)
It works well (status = 0).
But it has function chdir which I do not like. As this is a side effect.
I removed chdir and tried to parseFile with full_file_path_name
xml_doc => parseFile( trim( full_file_path_name ), iostat = status )
But I got the status = 1001
I tried to pass
D:\example.xml -> status 1001
D:\\Case_20_basic.xml -> status 1001
D:/example.xml -> status = 1
"D:\example.xml" -> status 1001
but I failed to find working variant.
Is there a way to open the file with full path?