home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / BASIC / POWBASIC / LIBRARY1 / EXISTS.ZIP / DEMOEX.BAS next >
BASIC Source File  |  1990-02-14  |  823b  |  23 lines

  1.  
  2.  $compile EXE  ' says to compile this to a .exe file
  3.  $LIB ALL OFF  ' no serial, print, or special graphic support
  4.  $ERROR ALL OFF'no error checking
  5.  
  6.  $link "Exists.pbu" 'link in the previously created pbu
  7.  PUBLIC MatchedFil$ 'not used in this demo, but is in the pbu
  8.  DEFINT a-z
  9.  CLS
  10.  LINE INPUT "Which filename do you need to check ";filename$
  11.    ' the next call is to the .pbu file, but no declare is
  12.    ' needed except for your own reference.
  13.  CALL FindVol(Filename$,FileErr%,CreateDate$,CreatTime$)
  14.  SELECT CASE FileErr%
  15.         CASE 0
  16.              PRINT "I found ";UCASE$(filename$)
  17.              PRINT "Created ";CreateDate$;
  18.              PRINT " at ";CreatTime$
  19.         CASE 2,18
  20.              PRINT "No File Found."
  21.  END SELECT
  22.  END(FileErr%)   'pass errorlevel to a calling program if needed
  23.