cannot script-delete / script-move folders

Discussion in 'ASP General' started by Apostolis K., Jan 31, 2004.

  1. Apostolis K.

    Apostolis K. Guest

    I run windows XP and IIS 5.1 and the system doesn't let me to delete or move
    folders using FileSystemObject.DeleteFolder(path,force) or
    FileSystemObject.MoveFolder(origin,destination). I allow all permitions to
    that web folder (Read, Right, Source Access)

    I notice that in Windows XP cannot uncheck the Read-Only option in any
    folder options. If you uncheck and press OK the next time you open the
    folder properties again the check box will be checked again
     
    Apostolis K., Jan 31, 2004
    #1
    1. Advertising

  2. Apostolis K.

    Apostolis K. Guest

    anybody??
     
    Apostolis K., Feb 1, 2004
    #2
    1. Advertising

  3. Apostolis K.

    Ray at Guest

    If you post some helpful info such as what code you're using and what error
    or non-expected behavior occurs, you may get a response. "Doesn't let me
    delete" doesn't really tell anyone anything.

    --

    Ray at home
    Microsoft ASP MVP


    "Apostolis K." <> wrote in message
    news:%...
    > anybody??
    >
    >
     
    Ray at, Feb 2, 2004
    #3
  4. Apostolis K.

    Apostolis K. Guest

    You are right Ray. I apologise.
    Here is the story
    I've got 2 directories in the Root directory with 1 subdirectory inside each
    of them (Total 4 directories)

    C:\test1
    C:\test1\test1a
    C:\test2
    C:\test2\test2a

    There is one file named "1.txt" inside the directory C:\test1\test1a
    When I run each of the codes I get the following error

    Error Type:
    Microsoft VBScript runtime (0x800A0046)
    Permission denied

    Note that I allow all permitions for the web folder (Read/Write etc)

    The codes are:
    ------*temp1.asp*----------------------------------------------
    <%
    Set objFSO=Server.CreateObject("Scripting.FileSystemObject")
    set objFolder=objFSO.GetFolder("C:\test1\test1a")

    objFolder.Move "C:\test2"
    %>
    -----------------------------------------------------------------

    ------*temp2.asp*----------------------------------------------
    <%
    Set objFSO=Server.CreateObject("Scripting.FileSystemObject")
    set objFolder=objFSO.GetFolder("C:\test1\test1a")

    objFolder.Delete TRUE
    %>
    -----------------------------------------------------------------

    ------*temp3.asp*----------------------------------------------
    <%
    Set objFSO=Server.CreateObject("Scripting.FileSystemObject")
    set objFile=objFSO.GetFile("C:\test1\test1a\1.txt")

    objFile.Move "C:\test2"
    %>
    -----------------------------------------------------------------

    ------*temp4.asp*----------------------------------------------
    <%
    Set objFSO=Server.CreateObject("Scripting.FileSystemObject")
    set objFile=objFSO.GetFile("C:\test1\test1a\1.txt")

    objFile.Delete TRUE
    %>
    -----------------------------------------------------------------
     
    Apostolis K., Feb 2, 2004
    #4
  5. Apostolis K.

    Ray at Guest

    "Apostolis K." <> wrote in message
    news:...


    > ------*temp1.asp*----------------------------------------------
    > <%
    > Set objFSO=Server.CreateObject("Scripting.FileSystemObject")
    > set objFolder=objFSO.GetFolder("C:\test1\test1a")
    >
    > objFolder.Move "C:\test2"



    You want to move it to C:\test2\
    You must include the \ at the end.


    > ------*temp2.asp*----------------------------------------------
    > <%
    > Set objFSO=Server.CreateObject("Scripting.FileSystemObject")
    > set objFolder=objFSO.GetFolder("C:\test1\test1a")
    >
    > objFolder.Delete TRUE
    > %>


    This code is fine. Do you get the error on this? If so, make sure that
    your IUSR account (or the account your page is using) has permission to
    delete the folder.


    > ------*temp3.asp*----------------------------------------------
    > <%
    > Set objFSO=Server.CreateObject("Scripting.FileSystemObject")
    > set objFile=objFSO.GetFile("C:\test1\test1a\1.txt")
    >
    > objFile.Move "C:\test2"


    You want to move it to C:\test2\
    You must include the \ at the end.



    > ------*temp4.asp*----------------------------------------------
    > <%
    > Set objFSO=Server.CreateObject("Scripting.FileSystemObject")
    > set objFile=objFSO.GetFile("C:\test1\test1a\1.txt")
    >
    > objFile.Delete TRUE


    This code is fine. Do you get the error on this? If so, make sure that
    your IUSR account (or the account your page is using) has permission to
    delete the folder.

    If you haven't already done so, you should download the WSH documentation
    here.
    http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9

    Ray at work
     
    Ray at, Feb 2, 2004
    #5
  6. Apostolis K.

    Ray at Guest

    p.s. When I mention permissions, I'm talking about NTFS file system
    permissions, not the permissions that you see in the IIS console.

    Ray at work

    "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
    message news:%...
    >
    >> This code is fine. Do you get the error on this? If so, make sure that

    > your IUSR account (or the account your page is using) has permission to
    > delete the folder.
    >
     
    Ray at, Feb 2, 2004
    #6
  7. Apostolis K.

    Apostolis K. Guest

    > p.s. When I mention permissions, I'm talking about NTFS file system
    > permissions, not the permissions that you see in the IIS console.


    I am the computer's Administrator. How do I change NTFS Permitions?
     
    Apostolis K., Feb 3, 2004
    #7
  8. Apostolis K.

    Ray at Guest

    Right click, click properties, go to the security tab.

    --

    Ray at home
    Microsoft ASP MVP


    "Apostolis K." <> wrote in message
    news:%...
    > > p.s. When I mention permissions, I'm talking about NTFS file system
    > > permissions, not the permissions that you see in the IIS console.

    >
    > I am the computer's Administrator. How do I change NTFS Permitions?
    >
    >
     
    Ray at, Feb 3, 2004
    #8
  9. Apostolis K.

    Apostolis K. Guest

    > Right click, click properties, go to the security tab.

    No such option in WinXP
     
    Apostolis K., Feb 3, 2004
    #9
  10. Apostolis K.

    Apostolis K. Guest

    > Right click, click properties, go to the security tab.


    I looked out the Windows Help for file and folder sharing and somewhere it
    sais to click the Security Tab. I can't find that tab.
    There are only a General / Sharing / Web Sharing and Customize Tabs. Under
    Sharing Tab it only allows to share files/folders on the network but I don't
    belong to any network. Moreover it sais to move my folders inside the Shared
    Documents for Local Sharing
     
    Apostolis K., Feb 3, 2004
    #10
  11. Apostolis K.

    Randy Rahbar Guest

    > I looked out the Windows Help for file and folder sharing and somewhere it
    > sais to click the Security Tab. I can't find that tab.


    Click on Start>Settings>Control Panel>Folder Options
    Click on the View tab
    Scroll to the bottom of the list and turn off "Simple File Sharing".

    The security tab should now display.
     
    Randy Rahbar, Feb 3, 2004
    #11
  12. Apostolis K.

    Ray at Guest

    Try inquiring about this in an XP group. Assuming your drive is NTFS, you
    have some issues where the security tab is hidden, which is some stupid
    default in a non-domain-member XP install. I hate that...

    Ray at work

    "Apostolis K." <> wrote in message
    news:%...
    > > Right click, click properties, go to the security tab.

    >
    > No such option in WinXP
    >
    >
     
    Ray at, Feb 3, 2004
    #12
  13. Apostolis K.

    Apostolis K. Guest

    It worked. Thanks
     
    Apostolis K., Feb 3, 2004
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George Ter-Saakov
    Replies:
    2
    Views:
    4,606
    Cesar Ronchese
    Jan 9, 2006
  2. fishinthenet
    Replies:
    0
    Views:
    1,679
    fishinthenet
    May 28, 2009
  3. Eduardo78
    Replies:
    0
    Views:
    274
    Eduardo78
    Nov 3, 2005
  4. Andrew Tomazos
    Replies:
    2
    Views:
    671
    Nobody
    Dec 12, 2011
  5. Rich Bogle

    Delete Folders

    Rich Bogle, Apr 28, 2004, in forum: Perl Misc
    Replies:
    12
    Views:
    207
    John W. Kennedy
    Apr 30, 2004
Loading...

Share This Page