Added and option to include an output folder name. The date and time of
creation is still appended to the folder name provided.
This commit is contained in:
parent
4fb1940085
commit
2a6628d529
9 changed files with 33 additions and 11 deletions
|
|
@ -347,6 +347,7 @@ MODULE moduleInput
|
|||
TYPE(json_file), INTENT(inout):: config
|
||||
LOGICAL:: found
|
||||
CHARACTER(:), ALLOCATABLE:: object
|
||||
CHARACTER(:), ALLOCATABLE:: baseName
|
||||
CHARACTER(8) :: date_now=''
|
||||
CHARACTER(10) :: time_now=''
|
||||
|
||||
|
|
@ -359,11 +360,22 @@ MODULE moduleInput
|
|||
|
||||
END IF
|
||||
|
||||
!Creates output folder
|
||||
!TODO: Add option for custon name output_folder
|
||||
!Gets actual date and time
|
||||
CALL DATE_AND_TIME(date_now, time_now)
|
||||
folder = date_now(1:4) // '-' // date_now(5:6) // '-' // date_now(7:8) // '_' &
|
||||
// time_now(1:2) // '.' // time_now(3:4) // '.' // time_now(5:6)
|
||||
|
||||
!Gets the basename of the folder
|
||||
CALL config%get(object // '.folder', baseName, found)
|
||||
PRINT *, baseName
|
||||
IF (found) THEN
|
||||
folder = baseName
|
||||
|
||||
END IF
|
||||
|
||||
!Compose the folder name
|
||||
folder = folder // '_' // date_now(1:4) // '-' // date_now(5:6) // '-' // date_now(7:8) // '_' &
|
||||
// time_now(1:2) // '.' // time_now(3:4) // '.' // time_now(5:6)
|
||||
|
||||
!Creates the folder
|
||||
CALL EXECUTE_COMMAND_LINE('mkdir ' // path // folder )
|
||||
|
||||
CALL config%get(object // '.cpuTime', timeOutput, found)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue