ASP file creation problem

Results 1 to 2 of 2

Thread: ASP file creation problem

  1. #1
    Join Date
    Dec 1969

    Default ASP file creation problem

    I am trying to generate a .cdk file on the fly using ASP. I can create the file, but the problem is that I want to give each file a unique name based on a timestamp. However, I am having trouble setting the filename as a variable. In the below code, I want to replace "testfile" with the variable "FileName". <BR> Thanks!<BR><BR><BR>&#060;%<BR><BR>FileName = Date & Time<BR>Const ForReading = 1, ForWriting = 2, ForAppending = 8<BR>Dim fso, f, fsoText<BR>Set fso = CreateObject("Scripting.FileSystemObject")<BR>set f = fso.OpenTextFile("d: estfile.cdk", ForWriting, True) <BR>f.WriteLine "Hello" <BR>f.WriteBlankLines (0)<BR>f.WriteLine "Hello again"<BR><BR>%&#062;<BR>

  2. #2
    Sid Guest

    Default RE: ASP file creation problem

    Have you ried replacing Date & Time for Now() ?<BR>Now() holds both date and time !<BR><BR>HTH Sid

Posting Permissions

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