File System Object

Results 1 to 2 of 2

Thread: File System Object

  1. #1
    Join Date
    Dec 1969

    Default File System Object

    Does anyone know if there&#039s a way to create files on the server using the file system object, or any other method for that matter. I know we can move/copy/delete, but what about create files, like an html file, or even a plain txt file? Any help would be great.<BR><BR>Thanks<BR>Steve<BR><BR>

  2. #2
    Duc Guest

    Default RE: File System Object

    You mean something like this<BR><BR> dim fname<BR> fname = Session("UserName") & i & ".txt"<BR> Set objfs = Server.CreateObject("Scripting.FileSystemObject")< BR> testfname = "/Inetpub/wwwroot/DUC/AccountRequest/Data/" & fname<BR> <BR> While objfs.FileExists(testfname)<BR> i = i + 1<BR> fname = Session("UserName") & i & ".txt"<BR> testfname = "/Inetpub/wwwroot/DUC/AccountRequest/Data/" & fname<BR> Wend<BR><BR> Set f = objfs.CreateTextFile("/Inetpub/wwwroot/DUC/AccountRequest/Data/" & fname , True)

Posting Permissions

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