Results 1 to 2 of 2

Thread: File Search [Resolved]

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2003
    Posts
    127

    File Search [Resolved]

    Looking for a better way to search for a file to see if it exists.

    I am currently using this and it works if you put in the exact directory path. I was wondering if there would be a way to get it to search the entire c: hard drive to see if the file exists even if it's in a sub directory of a subdirectory of a directory etc...

    Code:
    Dim Check As Integer, filepath As String
            filepath = "C:\abc.txt"
            Check = Len(Dir$(filepath))
            If Check = 0 Then
                MessageBox.Show("Found it")
            ElseIf Check <> 0 Then
                MessageBox.Show("Nowhere around")
            End If
    Last edited by teamdad; Aug 3rd, 2004 at 01:08 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width