Check if a certain file exists - Visual Basic .NET

Tags: VB.NET, VB 2008, VB 2010, VB 2012, VB 2013

The following code is used to check if a file (picture, document, video, pdf, etc...) exists on your computer:



If My.Computer.FileSystem.FileExists("C:\location\file.xxx") Then
'file does exist
'/ Do Action

Else
' file doesn't exist
End If


Share This

Home | About | Contact | Privacy Policy

Copyright visual-basic-tutorials.com 2017 - All Rights Reserved.