Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
23 Views

create folder with time and date

hello

im having problems to create a simple folder with time and date and then create a file with custom filename, could someone please help me?

"USE IFPORT
LOGICAL(4) result
character(len=10) :: time,date
call date_and_time(time=time)
call date_and_time(date=date)
result = MAKEDIRQQ(time,date)
OPEN(UNIT=404, ACCESS='SEQUENTIAL', FORM='BINARY', FILE='/time,date/filename', STATUS='REPLACE', convert='big_endian')
CLOSE(unit=404)"

thank you for your attention

0 Kudos
1 Reply
Highlighted
Black Belt
23 Views

There are numerous errors in your lines of code. You will need to sit down with a Fortran language manual and check that each line is syntactically correct and that it has the meaning that you wish it to have.

Here are some points.

  • The variable names that you declare in the third line conflict with module variables in IFPORT.
  • MAKEDIRQQ takes a single character argument, and that argument must have a value that is suitable for a directory name.
  • FILE='/time,date/filename' implies that you want the filename to be, literally, the string /time,date/filename . Probably not what you wanted.
0 Kudos