If you just want to create your text file perform this:
My.Computer.FileSystem.WriteAllText(FilePath, "", False)
We are actually writing "" (blank) to the text file. By default, the file will be created if it doesn't exist.
If you want to write text to the newly made file just do this:
My.Computer.FileSystem.WriteAllText(FilePath, "text to be written", False)
If you want to append an existing file, just change False to true.
If you want to delete the file we made just run this:
My.Computer.FileSystem.DeleteFile(FilePath)
I hope that this tutorial will help you better under stand the FileSystem class in the My namespace and show you how the FileSystem class can easily replace the System.IOs file streams and stream writers/readers.













