PDA

View Full Version : How to put a output file in a network path with Fortran f90


socorroros
Jan24-12, 11:01 AM
Hello Folks

I have a program code in Fortran f90, that program generate an output file and put that into the same directory where the program resides, I need to put that output file in a network path ex: \\server_name\resource_shared

I will appreciate if you could provide me the commands in fortran to do this

Thank you very much in advance and regards

hotvette
Jan25-12, 11:49 PM
You can specify the path when declaring the output device, so I'd think the path could be a network drive.

PROGRAM OUT_FILE_TEST
OPEN (12,file='C:\$User\OUT.TXT')
WRITE (12,*) 'This is a test writing to C:\$User\OUT.TXT'
CLOSE (UNIT=12)
END PROGRAM OUT_FILE_TEST

chiro
Jan26-12, 12:36 AM
Hello Folks

I have a program code in Fortran f90, that program generate an output file and put that into the same directory where the program resides, I need to put that output file in a network path ex: \\server_name\resource_shared

I will appreciate if you could provide me the commands in fortran to do this

Thank you very much in advance and regards

Hey socorroros and welcome to the forums.

One thing that you can do is to map a network path to a drive. You can do this in windows. Something like this should help:

http://www.linglom.com/2008/09/28/how-to-map-a-network-drive-on-windows/