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

Fortan on Window XP SP3 - how do i list the contents of a directory

a-p
Beginner
518 Views
I am using Intel Visual Fortan Compiler Ed 11.1 for Windows with Visual Studio 2008. I am running Win XP SP3.
Does anyone have an example of how to list the contents of a directory and get the file attributes of each file found?
thank you
A-P
0 Kudos
3 Replies
mecej4
Honored Contributor III
518 Views
See if the following will suffice.

[fortran]program listdir
use ifwin
call systemqq('attrib c:lang*.*')
end program listdir
[/fortran]
0 Kudos
a-p
Beginner
518 Views

How would I list the directory and capture the name of the files into a variable that can be used for other processing?
thank you
a-p

0 Kudos
Steven_L_Intel1
Employee
518 Views
Look at the on-disk documentation for Fortran library routine GETFILEINFOQQ.
0 Kudos
Reply