Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to check if file existe?

How to check if file existe?

Scheduled Pinned Locked Moved Visual Basic
tutorialquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TPN
    wrote on last edited by
    #1

    How to check if file existe in VB? Thanks for any reply.

    V Q 2 Replies Last reply
    0
    • T TPN

      How to check if file existe in VB? Thanks for any reply.

      V Offline
      V Offline
      Villly
      wrote on last edited by
      #2

      Hi, Just use "Dir" command in VB to check it's existance. Say, if Dir("filename") then '' Task to do if file exists end if It will retrun True if exists or False if file is not there on the mentioned path. You can use other parameters like vbDirectory, vbSystemFile etc. to check file or folder property. Best Regards, Vilas Shewale ;)

      T 1 Reply Last reply
      0
      • V Villly

        Hi, Just use "Dir" command in VB to check it's existance. Say, if Dir("filename") then '' Task to do if file exists end if It will retrun True if exists or False if file is not there on the mentioned path. You can use other parameters like vbDirectory, vbSystemFile etc. to check file or folder property. Best Regards, Vilas Shewale ;)

        T Offline
        T Offline
        TPN
        wrote on last edited by
        #3

        Thanks so much for your reply.

        1 Reply Last reply
        0
        • T TPN

          How to check if file existe in VB? Thanks for any reply.

          Q Offline
          Q Offline
          qnguyen
          wrote on last edited by
          #4

          Here is another way. If IO.File.Exits("FileName") Then 'Do something End If

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups