Results 1 to 2 of 2

Thread: Daily file generation?

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Location
    usa
    Posts
    10
    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

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    461
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width