- #1
ivans1984
- 2
- 0
Hello oeveryone
i've got many txt files each with a different name, such as
filename1.txt
filename2.txt
...
i've got another txt in which I've got the list of the name
of the files
i want to allocate in a vector of characters che name of the files
and use this to open all files with a do cycle, like
do i=1,n
open (10+i, file='file(i)',status='old')
end do
but doing so the code doesn't work, the file is not found
(even though i successfully allocated filenames into the vector file(i))
can you tell me where is the mistake?
thanks
i've got many txt files each with a different name, such as
filename1.txt
filename2.txt
...
i've got another txt in which I've got the list of the name
of the files
i want to allocate in a vector of characters che name of the files
and use this to open all files with a do cycle, like
do i=1,n
open (10+i, file='file(i)',status='old')
end do
but doing so the code doesn't work, the file is not found
(even though i successfully allocated filenames into the vector file(i))
can you tell me where is the mistake?
thanks