Execute_command_line

Steve Kargl sgk@troutmask.apl.washington.edu
Mon Oct 7 18:53:00 GMT 2013


On Mon, Oct 07, 2013 at 06:13:14PM +0000, Szabó László wrote:
> Thanks Steve!
> 
> I tried SYSTEM subroutine earlier, but this method doesn't wait
> for the executed program has been finished. I would like to copy
> some big size files in a fortran program, and after copy I would
> like to open these files. Since SYSTEM doesn't wait for the end
> of copying when I try to open files, I get "No such file" errors....

call system("cp file1 file2 && sync")

or

call system("cp file1 file && sleep 2")

or

call system("cp file1 file2")
call sleep(2)

-- 
Steve



More information about the Fortran mailing list