Re: Checking if a file exists
- From: "Veign" <NOSPAMveign1@xxxxxxxxx>
- Date: Mon, 27 Feb 2006 00:05:18 GMT
Public Function FileExists(ByVal filespec As String) As Boolean
On Error Resume Next
FileExists = (GetAttr(filespec) And vbDirectory) = vbNormal
End Function
Public Function DriveExists(ByVal DriveSpec As String) As Boolean
On Error Resume Next
DriveExists = Len(CurDir$(DriveSpec)) > 0
End Function
Public Function FolderExists(ByVal FolderSpec As String) As Boolean
On Error Resume Next
FolderExists = (GetAttr(FolderSpec) And vbDirectory) = vbDirectory
End Function
--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
Veign's Blog
http://www.veign.com/blog
--
"Nick" <nicholas_jp@xxxxxxxxxxxx> wrote in message
news:1140998289.815052.268120@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi everyone,
Is there a way VB6 can test for the existance of a specific data file?
Thanks,
Nick
.
- References:
- Checking if a file exists
- From: Nick
- Checking if a file exists
- Prev by Date: Re: visual basic program to manipulate text
- Next by Date: Re: What is the status of VB6 & DOT.NET ?
- Previous by thread: Checking if a file exists
- Index(es):
Relevant Pages
|