Results 1 to 4 of 4

Thread: Checking if a file exists...

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636

    Checking if a file exists...

    Hi,

    I want to know how to check if a file exists?
    how?

    Thank you,
    Arie. (mag.up.co.il)

  2. #2
    DaoK
    Guest
    VB Code:
    1. Private Function Exists(strFullPath As String) As Boolean
    2.     Exists = Len(Dir$(strFullPath)) <> 0
    3. End Function

    use that

  3. #3
    DaoK
    Guest
    VB Code:
    1. Private Sub Form_Load()
    2. If Exists("c:\windows\font.zip") = True Then
    3.     MsgBox "The File Exist"
    4. Else
    5.     MsgBox "The File Do NOT Exist"
    6. End If
    7. End Sub
    8.  
    9. Private Function Exists(strFullPath As String) As Boolean
    10.     Exists = Len(Dir$(strFullPath)) <> 0
    11. End Function

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636
    Thank you,
    Arie.

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