October 9th, 2003, 07:50 AM
I have created awebpage thru which i create a file and write some data into it.Problem is i couldnt able to create a file.can anybody check the code and find out the error
It is in VBSCRIPT.
Writing a file
dim filesys, demofile, txtstream
set filesys = CreateObject ("Scripting.FileSystemObject")
set demofile = filesys.CreateTextFile ("c:\hellotest.txt", true)
set demofile = filesys.GetFile("c:\hellotest.txt")
set txtstream = demofile.OpenAsTextStream (2, -2)
txtstream.Write "This will overwrite any text already in the file."
<input type="Submit" Name="cmdWrite" value="Click">