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

Does Fortran provide internal function or subroutine to read all files' names in a directory?

brickflying
Beginner
361 Views
Hi
Does Fortran provide internal function or subroutine to read all files' name in a directory?
I don't want to use system("ls > name.txt")
Thanks.
0 Kudos
1 Solution
Steven_L_Intel1
Employee
361 Views
The Fortran standard does not, but Intel Fortran does - GETFILEINFOQQ.

View solution in original post

0 Kudos
2 Replies
Steven_L_Intel1
Employee
362 Views
The Fortran standard does not, but Intel Fortran does - GETFILEINFOQQ.
0 Kudos
TimP
Honored Contributor III
361 Views
system() is more portable among various implementations of Fortran than the directory extensions are. Either way, it may be a difficult search to find something which works with all the Fortran implementations you are interested in.
0 Kudos
Reply