-
How can I get this script to save the file with the days date and time as the name. and help would be appreciated.
Thanks
Script:
==================================================
<%
Dim filesys, txtfile
Set filesys = CreateObject("Scripting.FileSystemObject")
Set txtfile = filesys.CreateTextFile("C:\test.txt", true)
dim item
for each item in Request.Form
txtFile.WriteLine (Request.Form (item))
next
txtfile.close 'close the file
set txtFile = nothing
%>
===========================================================
-
Hi,
Try this
Code:
<%
Dim filesys, txtfile
Dim strFile 'hold filename to write to
strFile = Now 'get current date and time
strFile = Replace(str, "/", "-") 'get rid of unacceptable
strFile = Replace(str, ":", "-") 'characters
Set filesys = CreateObject("Scripting.FileSystemObject")
Set txtfile = filesys.CreateTextFile(strFile, true) 'use strFile as the file path
dim item
for each item in Request.Form
txtFile.WriteLine (Request.Form (item))
next
txtfile.close 'close the file
set txtFile = nothing
%>
Hope this helps
Shaun