Alexander Slanina wrote:
> Hi folks !
>
> End of my wits 
>
> My fortran program produces 4 log-files. After these files are closed
> i want them to have other filenames, like old_name + date + time +
> ".log".
Call this subroutine ('filename_date_time ') for your log-files (after
log-files are closed):
subroutine filename_date_time (NameFile, ierr)
use dfwin, only: MoveFile
implicit none
character(*), intent(in):: NameFile !log file name - without '.log'
integer, intent(out):: ierr
character(8):: date
character(10):: time
call date_and_time(date, time)
ierr=
MoveFile(NameFile//'.log.'//char(0),NameFile//date//time//'.log'//char(0))
endsubroutine
It will work under Windows. For Unix, you write own MoveFile wrapper
function (use 'rename').
--
Aca.