call system command
call system command
(OP)
i would like to run an program.exe through my fortran code in a folder different than my fortran code
I have used the following 3 codes but the system cannot find the file specified:
1.
call system ('folder\program <IN.DAT')
2.
call system ('\folder\program <IN.DAT')
3.
call system ('cd folder')
call system ('program <IN.DAT')
Could anyone help me? Thanx in advance.
I have used the following 3 codes but the system cannot find the file specified:
1.
call system ('folder\program <IN.DAT')
2.
call system ('\folder\program <IN.DAT')
3.
call system ('cd folder')
call system ('program <IN.DAT')
Could anyone help me? Thanx in advance.





RE: call system command
call system ('c:\folder\program <IN.DAT')
RE: call system command
call system ('C:\Users\kostis\Documents\COMPUTATIONAL PHYSICS 4th\PROJECT SCREEN3\screen3LOOP\folder\program <IN.DAT')
however i can create a file in the folder like this:
OPEN(UNIT=99,FILE='folder\IN.DAT',STATUS='REPLACE')
so i would expect this:
call system ('folder\program <IN.DAT')
to work
RE: call system command
folder\program <IN.DAT
work successfully at the command prompt in a DOS window?
In the full path name instead of using the long name version with spaces try the equivalent short name version (8.3 format)
RE: call system command
CODE
RE: call system command
folder\program <IN.DAT
doesnt work in a DOS window so i shouldnt expect it to work throygh my code.
But then the
call system ('cd folder')
call system ('program <IN.DAT')
should work then but it doesnt also
How can i put these two commands in a single line?
RE: call system command
call system ('"C:\Users\kostis\Documents\COMPUTATIONAL PHYSICS 4th\PROJECT SCREEN3\screen3LOOP\folder\program.exe" <IN.DAT')
RE: call system command
program <IN.DAT
work at the command prompt in a DOS window?
Programs I write that pick up data file names from the launching command line don't require the < symbol , I use the standard fortran "call get_command_argument" to do this (without a <)
What error message did you get in the DOS window with folder\program <IN.DAT ?
RE: call system command
program <IN.DAT
works at the command promt in a DOS window
RE: call system command
CODE
call system ('program <IN.DAT')
CODE
RE: call system command
HTH.