In this task, the job is to create a new empty file called "output.txt" of size 0 bytes
and an empty directory called "docs". This should be done twice: once "here", i.e. in the current working directory and once in the filesystem root.

 
Module MakeDirAndFile {
      Def WorkingDir$, RootDir$
      If Drive$(Dir$)="Drive Fixed" Then WorkingDir$=Dir$
      If Drive$("C:\")="Drive Fixed" Then RootDir$="C:\"
 
      if WorkingDir$<>"" Then task(WorkingDir$)
      If RootDir$<>"" then task(RootDir$)
      Dir User ' return to user directory
 
      Sub task(WorkingDir$)
            Dir WorkingDir$
            If Not Exist.Dir("docs") then SubDir "docs" : Dir WorkingDir$
            If Exist.Dir("docs") Then Print str$(File.Stamp("docs"), "YYYY|MM|DD|hh:nn:ss")
            Open "output.txt" For Output as #F
            Close #f
            If Exist("output.txt") Then Print str$(File.Stamp("output.txt"), "YYYY|MM|DD|hh:nn:ss")
      End Sub
}
MakeDirAndFile
 