4 lines or 50? fileExists

Discussion in 'AutoCAD' started by Mark Propst, Sep 12, 2003.

  1. Mark Propst

    Mark Propst Guest

    I have this primative little 4 liner to verify if a file exists

    Function FileExists(sFileName As String) As Boolean
    FileExists = False
    If Dir(sFileName) <> "" Then
    FileExists = True
    End If
    End Function

    I also have an example of using api to do the same thing
    it looks like close to a hundred lines...
    is there a compelling reason to disparage the simple minded approach above
    for the exotic but longwinded api approach?
     
    Mark Propst, Sep 12, 2003
    #1
  2. Mark Propst

    Mark Propst Guest

    This is so Great, getting to talk to people all over the globe!
    10am=3am (missouri usa) cool!

    thanks for the examples, I'll study them some more to get the gist of it.
    Mark
     
    Mark Propst, Sep 12, 2003
    #2
  3. Mark Propst

    Mark Propst Guest

    Thanks for the tips,
    I wasn't aware of the time issue, that's exactly the kind of info I was
    wondering about.
    Thanks
    Mark
     
    Mark Propst, Sep 12, 2003
    #3
  4. KC?

    --
    R. Robert Bell, MCSE
    www.AcadX.com


    "Mark Propst" <nonentityatplanetkcdotcom> wrote in message
    | This is so Great, getting to talk to people all over the globe!
    | 10am=3am (missouri usa) cool!
    |
     
    R. Robert Bell, Sep 12, 2003
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.