DEFTYPE.s Dir,FName,Path,Name
DEFTYPE.l Lock,I,RC

;MaxLen Path=256

Let Dir="C:"
Let Name="SYS:System/DiskCopy"
Let I=0

Lock.l=Lock_(&Dir,-2)
If Lock
  If InitExAll
    If InitExAllBuffer(0,1024)
      If SetPattern (0,"S#?",Off)=False
        NPrint "Can't set pattern"
      End If
      RC=ExAll (0,Lock,6)
      NPrint EAEntries
      DEDateFormat 0:DEDateFlag 1|2
      While EANextEntry(0)
        Let I+1
        EAEntryDate 0
        NPrint EAEntryName$(0)," ",DEDay$," (",DEDate$,") ",DETime$
      Wend
      NPrint I
      NPrint ""

      DEDateFormat 0:DEDateFlag 1|2
      DateStamp
      NPrint DEDay$," (",DEDate$,") ",DETime$
      DEDateFormat 0:DEDateFlag 0
      DateStamp
      NPrint DEDay$," (",DEDate$,") ",DETime$
      DEDateFormat 1:DEDateFlag 0
      DateStamp
      NPrint DEDay$," (",DEDate$,") ",DETime$
      DEDateFormat 2:DEDateFlag 0
      DateStamp
      NPrint DEDay$," (",DEDate$,") ",DETime$
      DEDateFormat 3:DEDateFlag 0
      DateStamp
      NPrint DEDay$," (",DEDate$,") ",DETime$

      NPrint ""
      If MatchPattern(0,"setPatch",Off)
        NPrint "String passt zu Pattern."+Chr$(10)
      Else
        NPrint "String passt nicht zu Pattern."+Chr$(10)
      End If
      FreePattern 0
        NPrint NameFromLock (Lock)
      FName=FilePart(Name)
      Path=PathPart(Name)
      NPrint "File: ",FName
      NPrint "Path: ",Path
      NPrint AddPart(Path,FName)
      NPrint StrBufSize
      FreeStringBuffer
      FreeExAllBuffer 0
    Else
      NPrint "Can't alloc ExAll-Buffer..."
    End If
    FreeExAll
  Else
    NPrint "Can't init ExAll..."
  End If
  UnLock_ Lock
Else
  NPrint "Can't lock dir..."
End If
;End
