file system object and CDONTS

Results 1 to 3 of 3

Thread: file system object and CDONTS

  1. #1
    Join Date
    Dec 1969

    Default file system object and CDONTS

    i have win2k and IIS5... but for some reason when i try and create a file it acts like its working but it doesn&#039;t work (the same goes for cdonts) here&#039;s the code:<BR><BR>&#060;%<BR>dim varFile, varText<BR><BR>set varfile=server.CreateObject("scripting.filesystemO bject")<BR>set vartext=varFile.CreateTextFile("c: est.htm", 2, True)<BR><BR>vartext.writeline("&#060;b&#062; this is a test &#060;/b&#062;")<BR><BR>vartext.close<BR>set vartext=nothing<BR>set varfile=nothing<BR>%&#062;

  2. #2
    Join Date
    Dec 1969

    Default You forget to mention the error message

    but since you made me guess, I think it&#039;s something in the line of &#039;Server.CreateObject failed&#039;. If so you have to register the components. Type the following lines at the command prompt:<BR><BR>regsvr32.exe [directory]sccrun.dll &#039; this is for FSO<BR>regsvr32.exe [directory]CDONTS.dll &#039; this is for CDONTS<BR><BR>replace the [directory] part with the actual directory where the files are on your computer<BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: file system object and CDONTS

    Your arguments to CreateTextFile are wrong. I&#039;m surprised the page doesn&#039;t bomb with an error.<BR><BR>set vartext=varFile.CreateTextFile("c: est.htm", True [, True for unicode])<BR>

Posting Permissions

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