469,323 Members | 1,611 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,323 developers. It's quick & easy.

cannot script-delete / script-move folders

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
Jul 19 '05 #1
12 4154
anybody??
Jul 19 '05 #2
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." <ap*********@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
anybody??

Jul 19 '05 #3
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.FileSystemOb ject")
set objFolder=objFSO.GetFolder("C:\test1\test1a")

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

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

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

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

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

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

objFile.Delete TRUE
%>
-----------------------------------------------------------------
Jul 19 '05 #4

"Apostolis K." <ap*********@hotmail.com> wrote in message
news:OL**************@TK2MSFTNGP09.phx.gbl...

------*temp1.asp*----------------------------------------------
<%
Set objFSO=Server.CreateObject("Scripting.FileSystemOb ject")
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.FileSystemOb ject")
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.FileSystemOb ject")
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.FileSystemOb ject")
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/d...6-1C4099D7BBB9

Ray at work
Jul 19 '05 #5
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:%2****************@tk2msftngp13.phx.gbl...
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.

Jul 19 '05 #6
> 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?
Jul 19 '05 #7
Right click, click properties, go to the security tab.

--

Ray at home
Microsoft ASP MVP
"Apostolis K." <ap*********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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?

Jul 19 '05 #8
> Right click, click properties, go to the security tab.

No such option in WinXP
Jul 19 '05 #9
> 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
Jul 19 '05 #10
> 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.
Jul 19 '05 #11
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." <ap************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Right click, click properties, go to the security tab.


No such option in WinXP

Jul 19 '05 #12
It worked. Thanks
Jul 19 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Bob | last post: by
3 posts views Thread by David T. Ashley | last post: by
1 post views Thread by vsp15584 | last post: by
1 post views Thread by kw.housing | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.