Writing to/Reading from a subdirectory?
Writing to/Reading from a subdirectory?
(OP)
Hello,
I have a program that outputs a ton of files. I'd like to output each file type to a separate subdirectory under the directory in which the program was executed.
Additionally, since it reads in a ton of input files, I'd like to do the reverse and read them in from a subdirectory as well.
Any input on this is greatly appreciated.
Thanks.
I have a program that outputs a ton of files. I'd like to output each file type to a separate subdirectory under the directory in which the program was executed.
Additionally, since it reads in a ton of input files, I'd like to do the reverse and read them in from a subdirectory as well.
Any input on this is greatly appreciated.
Thanks.
RE: Writing to/Reading from a subdirectory?
RE: Writing to/Reading from a subdirectory?
RE: Writing to/Reading from a subdirectory?
c Example program
character*80 outdir,outfile
character*160 fullname
outdir='NameofSubdir\'
outfile='NameofFile.ext'
c Combine path and file name:
fullname = outdir(1:len_trim(outdir))//outfile
c Print to screen to check:
print*,'Path and File: ',fullname
open(7,file=fullname)
c For example :
write(7,*)data
close (7)
end
I know it's a trivial thing, but having things come out in an orderly fashion always helps me think better. :)