The CreateTextFile method of the FileSystemObject is used, as its name implies, to create a text file in a given folder on the server. It has a filename parameter (required ), an optional overwrite parameter and an optional unicode parameter, so the syntax is:
overwrite is a Boolean - so set it to true if you want to allow the object to overwrite the file. Set it to false if you don't
unicode is also Boolean - set it to true if to indicate that the file is in Unicode. Omit this variable, or set it to false if you want to create a standard ASCII file.
Here are two examples of using the createtextfile method. First at its most straightforward:
If you have a virtual server, or a deeper file structure you may want to use Request.ServerVariables("Appl_Physical_path") which finds the root folder for the current website application (for example, on codetoad.com this might be "C:/my_domains/codetoad/" )
The code then would be