Showing posts with label ASP FILE SYSTEM OBJECT. Show all posts
Showing posts with label ASP FILE SYSTEM OBJECT. Show all posts

Wednesday, 16 February 2011

what is ASP FileSystemObject?

The FileSystemObject object is used to access the file system on a server.
This object can manipulate files, folders, and directory paths. It is also possible to retrieve file system information with this object.
The following code creates a text file (c:\test.txt) and then writes some text to the file:

<%
dim fs,fname
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fname=fs.CreateTextFile("c:\test.txt",true)
fname.WriteLine("Hello World!")
fname.Close
set fname=nothing
set fs=nothing
%> 

SOURCE W3SCHOOLS.COM