Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Inquiring about file attributes

Michael8
Beginner
397 Views

Hello:

I'm wondering if anyone knows of a way (in Fortran, of course) to find out if a filehas theread-only attribute turned on. I tried using theINQUIRE statement with the READWRITE specifier, but that seems to only work if I've already opened the file. I'm trying to find out about the file without opening it.

In the meantime, I've found a way to do this using a system call and tapping into the ATTRIB command in DOS, but this is ugly and I'm looking for a, preferably,standard-compliant method.

Thanks.
Michael

0 Kudos
2 Replies
Steven_L_Intel1
Employee
397 Views
In standard Fortran, no. In Intel Fortran, GETFILEINFOQQ.
0 Kudos
Michael8
Beginner
397 Views

Ah, good. That'll do.

Thanks.
Michael

0 Kudos
Reply