🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.lang.basic
Article #452

Re: HELP wanted: filehandling in Visual Basic

#452
From: Brian Wheeler
Date: Tue, 26 Jan 1993 17:53
40 lines
1819 bytes
In <1993Jan26.135724.234@samba.oit.unc.edu> dil.admin@mhs.unc.edu (Dave Laudicina) writes:

>>Basically, it boils down to this:
>> 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.
>>
>You could set up a file list box for a particular drive and path 
>and search through the file list to see if the file is in the list.

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

the Dir$ function Returns the name of a file matching a filespec.  if the
filespec is a filename without wildcards, it returns whether or not the file
exists.
Here's what I do:

const False = 0
Const True = Not False

Function Exists(Filespec$)
	if Dir$(FileSpec$) <> "" then
		Exists = True
		Exit Function
	else
		Exists = False
	end if
End Function

Brian Wheeler

-- 
******************************************************************************
* Brian 'Nautical' Wheeler - These are my opinions, do you hear me?  MINE!
* cat flames > /dev/null                    "Wombats are our friends" - Me
******************************************************************************
Technical Details
Message-ID: <C1H320.IEM@usenet.ucs.indiana.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!sol.ctr.columbia.edu!usenet.ucs.indiana.edu!silver.ucs.indiana.edu!bdwheele
References: <1993Jan26.135724.234@samba.oit.unc.edu>

Show Full Headers
Complete Article Headers
Newsgroups: alt.lang.basic
Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!sol.ctr.columbia.edu!usenet.ucs.indiana.edu!silver.ucs.indiana.edu!bdwheele
From: bdwheele@silver.ucs.indiana.edu (Brian Wheeler)
Subject: Re: HELP wanted: filehandling in Visual Basic
Message-ID: <C1H320.IEM@usenet.ucs.indiana.edu>
Sender: news@usenet.ucs.indiana.edu (USENET News System)
Nntp-Posting-Host: silver.ucs.indiana.edu
Organization: Indiana University
References: <1993Jan26.135724.234@samba.oit.unc.edu>
Date: Tue, 26 Jan 1993 17:53:59 GMT
Lines: 40