This is the code. It checks if the file in path exists, if not, it creates the file. I'm getting this error message all the time and I don't know why. Maybe I should close the System.IO.Directory.Exists? If yes, how do I do that? Just so you know, I'm creating a text file.
The code
If Not (System.IO.Directory.Exists(path)) Then
Dim fs3 As FileStream = File.Create(path)
End If
This is the error message I get:
Process can't use the file (path) because some other process is using this file at the moment.