home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / alt / lang / basic / 1108 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.2 KB  |  38 lines

  1. Newsgroups: alt.lang.basic
  2. Path: sparky!uunet!charon.amdahl.com!amdahl!rtech!decwrl!sdd.hp.com!swrinde!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watmath!undergrad.math.waterloo.edu!bcbond
  3. From: bcbond@undergrad.math.waterloo.edu (Barry Bond)
  4. Subject: Re: HELP wanted: filehandling in Visual Basic
  5. Message-ID: <C1H8KI.Av9@undergrad.math.waterloo.edu>
  6. Organization: University of Waterloo
  7. References: <1993Jan26.135724.234@samba.oit.unc.edu>
  8. Date: Tue, 26 Jan 1993 19:53:03 GMT
  9. Lines: 27
  10.  
  11. In article <1993Jan26.135724.234@samba.oit.unc.edu> dil.admin@mhs.unc.edu (Dave Laudicina) writes:
  12. >>Basically, it boils down to this:
  13. >> How can I determine whether a file (in this case a .BMP) exists in the
  14. >> given path?
  15. >>
  16. >>If someone can tell me what I have to do to solve this problem, please,
  17. >>mail me. I would be very grateful.
  18. >>
  19. >You could set up a file list box for a particular drive and path 
  20. >and search through the file list to see if the file is in the list.
  21. >
  22. >I would also be interested if anyone has found a more efficient way
  23. >to do this.
  24. >Thx Dave L
  25. >
  26. >
  27.  
  28. It's easier to use DIR$() to check if a file exists:  eg.
  29. if Dir$("c:\vb\test.bmp") <> "" then
  30.    debug.print "File exists"
  31. else
  32.    debug.print "File not found"
  33. endif
  34.  
  35. Barry.
  36.  
  37.  
  38.