| Topic: ASP Reading and Writing files in ASP FileSystemObject provides access to a computer's file system. Some of the common tasks that can be performed using FileSystemObject are to check for a particular folder, drive, or file, and create/modify/delete files (if you have proper folder/file permissions). To start with, following is the code which describes how to use the FileSystemObject to create a text file, and write some text: You create an instance of FileSystemObject , and create a text file c:\testfile.txt , and write some text into it. The second method to create a text file is by using OpenTextFile method of FileSystemObject object with ForWriting flag. <%Const ForWriting = 2 Set a = fsoOpenTextFile ( "c:\testfile.txt" , ForWriting , True ) %> Following are the modes, by which files can be opened:
|
|