Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

using asp to delete folder. Help!!!!

I try to processing all the file within the folder then after processing, I like to delete the folder.

I am using folder object to do the following:

<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c: est")
fo.Delete
set fo=nothing
set fs=nothing
%>

I got message Microsoft VBScript runtime(0x800A0046)
permission denied.

Any idea? Help!!!


Comments

  • vanithvanith Member Posts: 44
    : I try to processing all the file within the folder then after processing, I like to delete the folder.
    :
    : I am using folder object to do the following:
    :
    : <%
    : dim fs,fo
    : set fs=Server.CreateObject("Scripting.FileSystemObject")
    : set fo=fs.GetFolder("c: est")
    : fo.Delete
    : set fo=nothing
    : set fs=nothing
    : %>
    :
    : I got message Microsoft VBScript runtime(0x800A0046)
    : permission denied.
    :
    : Any idea? Help!!!
    :
    :
    :
    Hi!


    You can create, modify or delete any file system object outside your virtual directory only if the Internet User account for your webserver has permission to that folder. Check your security permission for the folder "c: est".

    If you dont loginto your website using NT authentication, the default account that is used by the IIS server is IUSER_servername, where servername is your web server's machine name. This user should be given security permission to the folder you want to access outside your website. To give the permission, add the IUSR_severname account with the required permission from the "Securities" tab of the "Properties" dialog of the folder.

    :)heers,
    Vanith



  • worldmap999worldmap999 Member Posts: 2
    : : I try to processing all the file within the folder then after processing, I like to delete the folder.
    : :
    : : I am using folder object to do the following:
    : :
    : : <%
    : : dim fs,fo
    : : set fs=Server.CreateObject("Scripting.FileSystemObject")
    : : set fo=fs.GetFolder("c: est")
    : : fo.Delete
    : : set fo=nothing
    : : set fs=nothing
    : : %>
    : :
    : : I got message Microsoft VBScript runtime(0x800A0046)
    : : permission denied.
    : :
    : : Any idea? Help!!!
    : :
    : :
    : :
    : Hi!
    :
    :
    : You can create, modify or delete any file system object outside your virtual directory only if the Internet User account for your webserver has permission to that folder. Check your security permission for the folder "c: est".
    :
    : If you dont loginto your website using NT authentication, the default account that is used by the IIS server is IUSER_servername, where servername is your web server's machine name. This user should be given security permission to the folder you want to access outside your website. To give the permission, add the IUSR_severname account with the required permission from the "Securities" tab of the "Properties" dialog of the folder.
    :
    : :)heers,
    : Vanith
    :
    :
    :
    :
    Thanks for the info. I check security for the folder has full control by users. Must somthing wrong with my program. Maybe some files still open even after I finished the processing. So what I did is redirect to the program only do the folder deletiion then no problem for the code.
    I will try to debug my code but at sametime by using this to make it work just temporary. If I find out what is wrong I will let you know. Thanks!!

    JC
  • Andre YoungAndre Young USAMember Posts: 0

    ____ \ http://forcoder.org \ free ebooks and video tutorials about ( PHP, Visual Basic .NET, JavaScript, Go, Scratch, PL/SQL, Visual Basic, Ruby, Java, MATLAB, C#, Objective-C, Swift, C, R, Perl, C++, Delphi, Python, Assembly Scala, Logo, COBOL, SAS, Kotlin, Rust, Julia, Lua, FoxPro, Dart, Lisp, Transact-SQL, Erlang, Alice, D, Hack, Prolog, ML, Clojure, LabVIEW, Apex, Bash, VBScript, F#, Crystal, Scheme, Ada, Awk, Fortran, ABAP ) _____

Sign In or Register to comment.