'INDXDATE - shows date of "LISTDESP.IDX" in $drive\index\. This is the last
'           index to be created but does not guarantee that all previous
'           indices have been created.

external ipath messboxwait() sch scw cpath

public   ptstr

global   x IndexFileTime() $file dl ReturnToMenu()


MAIN

  IndexFileTime()

  messboxwait(" Indices created on"&dl,0,0,1)

  ReturnToMenu()

END MAIN


FUNCTION IndexFileTime()
local t
  $file=ipath|"listdesp.idx"      'message "$file) is:"&str($file)
  if file($file)=1
    x=fileinfo($file,f_datetime)
    dl=date2(left(str(x),5))           'message "date of LISTDESP file is:"&str(dl)
    return(0)
  else
    return(1)
  end if

END FUNCTION 'IndexFileTime()


FUNCTION ReturnToMenu()
  screen clear box 1 1 sch scw 0 0 no-border
  repaint off
  file unload all
  transfer cpath|"pm_menu.psl" in-memory
END FUNCTION ' ReturnToMenu()

