🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.lang.basic
Article #455

Re: HELP wanted: filehandling in Visual Basic

#455
From: Bruce Garrett
Date: Wed, 27 Jan 1993 23:45
32 lines
1525 bytes
   dil.admin@mhs.unc.edu (Dave Laudicina) writes:

>> > How can I determine whether a file (in this case a .BMP) exists in the
>> > given path?

>> >If someone can tell me what I have to do to solve this problem, please,
>> >mail me. I would be very grateful.

DL> You could set up a file list box for a particular drive and path 
DL> and search through the file list to see if the file is in the list.

DL> I would also be interested if anyone has found a more efficient way
DL> to do this.

	Why can't you use the DIR$ Function?  This function accepts a 
filespec mask and returns a string containing a filename or NULL if the file 
does not exist and can be repeatedly polled for all files meeting a wildcard 
filespec.

	IF Len(Dir$(FileSpec$)) > 0 THEN
		(stuff to do if the file exists)
	ELSE
		(stuff to do if it ain't there)
	END IF

	Check out page 94 of the Language Reference.

-Bruce Garrett
                                                                       \
 --- IF Bogosity%(Opinion$) > BSThreshold% THEN Opinion$ = ""          /\
 
  
Technical Details
Message-ID: <1k76qbINNrm3@digex.digex.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!digex.com!digex.com!not-for-mail
References: <1993Jan26.135724.234@samba.oit.unc.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!digex.com!digex.com!not-for-mail
From: bruceg@access.digex.com (Bruce Garrett)
Newsgroups: alt.lang.basic
Subject: Re: HELP wanted: filehandling in Visual Basic
Date: 27 Jan 1993 18:45:15 -0500
Organization: Express Access Online Communications, Greenbelt, MD USA
Lines: 32
Message-ID: <1k76qbINNrm3@digex.digex.com>
References: <1993Jan26.135724.234@samba.oit.unc.edu>
NNTP-Posting-Host: access.digex.com