-
I'm trying to develop a VBscript that will take the contents from a web-based FORM and append the data to a single text file each day. The kicker is that the file compiles only 24hrs of inputs from the form then saves the file to a folder on the server then starts up a new file with the same results creating a "file per day " structure.
such as:
"data8-31-00.txt"
"data9-01-00.txt"
and so on.
Does anyone know a way that this can be done?
im stumped and my head is spinning. Any help will be appreiciated.
Thanks
-
All you need to do is set up the VBScript to take the form data and store it in a text file.
The only "difference" is that you get the name of the text file from a function that includes the date.
Code:
TextFileName = "Data" & Format(Date,"yyyy-mm-dd") & ".dat"
So this way, because you set the open status of the text file to be append/create it will automatically write to the same file appending the data until the "Date" function returns a different date at which time it will automatically create a new file with the new filename and continue.