Need help checking if file is already saved VB.Net 03
I am trying to write the code in VB.Net 03 to save a file to a location (C:\) and I would like for when I attempt to save a document to that location to make sure a document with the same name is not already saved and return a message that says file already exists would you like to replace. For example I would like for when I click the button to attempt to save the file to the location and if that file already exists give a message in a text box. I know how to save the file the problem is checking for the file (i.e. maybe an if statement). I'm not sure what code to write to check for the file in that location. Any suggestions would be greatly appreciated. Thank you for your help.
Here's the first part of the code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AutoSave.Click
Dim b As Integer
Dim itemID As String
Dim location As String
Dim type As String
Dim storage As String
itemID = eBSS1.ActiveCell.Previous.Value.ToString
location = "C:\"
type = ".mht"
storage = (location & itemID & type)
'Im assuming an if statement can be inserted here but I'm not sure how to write the code to check