Find Newest File Within Folder

  Needed a function to find the newest file (via last write date) from a folder while writing a PlayBASIC backup tool.

PlayBASIC Code:
    ;  this will be the folder of this running project
    Path$=currentdir$()

    ; Search the this path for the newest PBA file (playbasic source code)
    File$ = FindNewestFileInFolder(Path$, "pba")

    print path$
    print File$

    Sync
    waitkey
COMMANDS USED: CURRENTDIR$ | PRINT | SYNC | WAITKEY |