Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# create file if not exists

string rootPath = Path.GetPathRoot(Environment.GetFolderPath(Environment.SpecialFolder.System));
        rootPath += "MTN";
        if (!(File.Exists(rootPath)))
        {
            File.CreateText(rootPath);
        }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #file #exists
ADD COMMENT
Topic
Name
4+8 =