|
-
Sep 12th, 2000, 09:24 AM
#1
Thread Starter
New Member
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
%>
===========================================================
-
Sep 12th, 2000, 11:35 AM
#2
Try this: (hopefully the Format function works in scripting)
These won't be 8/3 filenames (obviously.)
==================================================
<%
Dim filesys, txtfile
Set filesys = CreateObject("Scripting.FileSystemObject")
Dim strFileName as string
strFileName = Format(Now, "MMDDYYHHMM")
strFileName = filesys.buildpath("C:\", strFileName & ".txt")
Set txtfile = filesys.CreateTextFile(strFileName, true)
dim item
for each item in Request.Form
txtFile.WriteLine (Request.Form (item))
next
txtfile.close 'close the file
set txtFile = nothing
%>
===========================================================
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|