Results 1 to 4 of 4

Thread: "CreatTextFile"/Overwrite-Blues...

  1. #1
    Seeker'O'Wisdom Guest

    Default "CreatTextFile"/Overwrite-Blues...

    we are trying to creating a text file with ...<BR><BR>Set objWriteFile = objFSO.CreateTextFile("c:inetpubwwwrootfolder1 extFile.txt", True)<BR><BR>and writing to it with...<BR><BR>objWriteFile.Write "text-goes-here"<BR><BR>when we try to OVERWRITE the existing file (of the same file-name) successive times... it does not. The first time it CREATEs the file just fine... however, even when we use the word "TRUE" to implicitly declare the (already default=true) OVERWRITE status value of the CREATE method... the original text file is not being OVERWRITEN. <BR><BR>if I try to first delete the existing file, before creating the new file, with ...<BR><BR>objFSO.DeleteFile("c:inetpubwwwrootfold er1 extFile.txt")<BR><BR>... we get the message..<BR><BR>Error Type: Microsoft VBScript runtime (0x800A0046) Permission denied<BR><BR><BR>We are using ASP 3 / IIS 5.<BR><BR>If you (OR ANYBODY) knows how to do this correctly, please email us at keith@out

  2. #2
    PratQ Guest

    Default permissions?

    What are the permissions for the directory? The IUSR account needs to have RWED permissions on the file. The file gets created with the default permissions of the directory. So if IUSR for the directory does not have RWED permissions, you shouldnt be able to overwrite the file (which is the equivilent of delete). <BR><BR>A caveot to this is if you are running the ASP page under an account other than IUSR, or if you are attempting to write to a network disk. <BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: permissions?

    thanks for your help! The permissions are set to read & write, for everyone on our intranet, for this one specific folder

  4. #4
    Join Date
    Dec 1969

    Default CreatTextFile"/Overwrite-

    check for the folder permission wether u havea full contol on that folder.if u are using winnt.Also check in IIS go to default web site Properties .In properties go to Home directory in access permission check the write . I hope this will help u sort out ur problem.<BR><BR>o.k. bye have a nice time...

Posting Permissions

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