How do I issue a command to the operating system within a Fortran program?
There is no standard way to do this in Fortran, but many compilers have an extension named "system" or something similar. Please consult the documentation of your compiler. In Fortran 2003, one can call C code, and it is possible to call the operating system from C.