This example shows how to check whether a file exist or not and writing text strings to file.
File (C:\file_ops.txt) doesn't exist File (C:\file_ops.txt) exists