I have been trying to make a program that copies binary files. I have used autocad .dwg files.
When I open the binary files in a text editor and compare them to the originals they are identical, EXCEPT for a few symbols on the last line. Could this be because the last record is not getting copied?
I have tried changing the record length and have determined that '32' works best. Here is the entire program:
------------------------------------------------------------
Program quad
character a*32
integer i
i=1
open (4,file='3GZF243131-5.dwg', form='unformatted',
1access='direct', status='old', recl=32)
open (8, file='test.dwg', form='unformatted',
1access='direct', status='old', recl=32)
do while(.true.)
read(4, rec=i) a
write(8, rec=i) a
i=i+1
enddo
close (4)
close (8)
stop
end
------------------------------------------------------------
Any help would be appreciated.
When I open the binary files in a text editor and compare them to the originals they are identical, EXCEPT for a few symbols on the last line. Could this be because the last record is not getting copied?
I have tried changing the record length and have determined that '32' works best. Here is the entire program:
------------------------------------------------------------
Program quad
character a*32
integer i
i=1
open (4,file='3GZF243131-5.dwg', form='unformatted',
1access='direct', status='old', recl=32)
open (8, file='test.dwg', form='unformatted',
1access='direct', status='old', recl=32)
do while(.true.)
read(4, rec=i) a
write(8, rec=i) a
i=i+1
enddo
close (4)
close (8)
stop
end
------------------------------------------------------------
Any help would be appreciated.