Dear Sir,
I want to put all the data in thousands of data files (data1.txt,
data2.txt,...) into ONE file (data.txt).
To simply the question, there is one column data in every files. Using
(Microsoft) Fortran
PowerStation 4.0, however, the program does not work.
Please try according to following three data files, for example, by saving
three data files into working directionary.
Looking forward to your advise.
Thank you a lot.
Mingwu Bai, Ph. D
Tohoku University
Japan
----------------------
character :: file*12
open(10,file='data.txt')
do i=1,3
write(file,'("data",i0,".txt")') i
open(11,file=file)
do
read(11,iostat=ios) aa
if (ios /= 0) exit
write(10,*) aa
end do
close (11)
end do
end
example of data files:
data1.txt
1.1
2.2
3.3
4.4
5.5
6.6
7.7
data2.txt
11.1
22.2
33.3
44.4
55.5
data3.txt
111.1
222.2
333.3
444.4
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|