The SYSTEM subroutine executes a system command as if from the command line.
SyntaxSYSTEM (cmd [, dosbox] [, spawn] )
cmd is an INTENT(IN) scalar of type CHARACTER. It is the system command to be executed as if it were typed on the command line.
dosbox is an INTENT(IN) scalar of type LOGICAL. It has the value true if a new DOS box is to be opened (required for internal commands like DIR) and false otherwise. By default, dosbox has the value true.
spawn is an INTENT(IN) scalar of type LOGICAL. It has the value true if the command or program to be executed is to be spawned as a separate process and false otherwise. By default, spawn has the value false.
Examplecall system("dir > current.dir") ! puts a listing of the current directory into ! the file 'current.dir'