home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 24 / CD_ASCQ_24_0995.iso / vrac / homonlib.zip / FILEXIST.BAS < prev    next >
BASIC Source File  |  1995-04-13  |  623b  |  22 lines

  1. DEFINT A-Z
  2.  
  3. ' $INCLUDE: 'DIR.INC'
  4. ' $INCLUDE: 'TRUEFALS.INC'
  5.  
  6. DECLARE FUNCTION FileExist (file$)
  7.  
  8. FUNCTION FileExist (file$)
  9. '****************************************************************************
  10. 'Returns TRUE or FALSE depending on whether the specified file exists.  If
  11. ' used with a wildcard, it will return true if any file matches the wildcard.
  12. '****************************************************************************
  13.  
  14. DIM DirInfo AS DirType                  'This one's pretty easy.
  15.  
  16. f$ = Dir$(file$, DirInfo)
  17.  
  18. IF LEN(f$) AND DirInfo.ErrorCode = 0 THEN FileExist = TRUE
  19.  
  20. END FUNCTION
  21.  
  22.