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
<script language="VBScript">
sub cmdWrite_OnClick
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."
End Sub
<form name="frmExe">
<input type="Submit" Name="cmdWrite" value="Click">