Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   cannot script-delete / script-move folders (http://www.velocityreviews.com/forums/t793043-cannot-script-delete-script-move-folders.html)

Apostolis K. 01-31-2004 04:25 AM

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



Apostolis K. 02-01-2004 09:52 PM

Re: cannot script-delete / script-move folders
 
anybody??



Ray at 02-02-2004 04:33 AM

Re: cannot script-delete / script-move folders
 
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." <apostolis80@hotmail.com> wrote in message
news:%239TT62Q6DHA.1020@tk2msftngp13.phx.gbl...
> anybody??
>
>




Apostolis K. 02-02-2004 09:51 PM

Re: cannot script-delete / script-move folders
 
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
%>
-----------------------------------------------------------------



Ray at 02-02-2004 10:07 PM

Re: cannot script-delete / script-move folders
 

"Apostolis K." <apostolis80@hotmail.com> wrote in message
news:OLn92cd6DHA.2764@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



Ray at 02-02-2004 10:16 PM

Re: cannot script-delete / script-move folders
 
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:%23qZryjd6DHA.3360@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.
>




Apostolis K. 02-03-2004 01:19 AM

Re: cannot script-delete / script-move folders
 
> 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 02-03-2004 01:38 AM

Re: cannot script-delete / script-move folders
 
Right click, click properties, go to the security tab.

--

Ray at home
Microsoft ASP MVP


"Apostolis K." <apostolis80@hotmail.com> wrote in message
news:%23HBHVPf6DHA.2572@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?
>
>




Apostolis K. 02-03-2004 05:10 PM

Re: cannot script-delete / script-move folders
 
> Right click, click properties, go to the security tab.

No such option in WinXP



Apostolis K. 02-03-2004 05:51 PM

Re: cannot script-delete / script-move folders
 
> 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




All times are GMT. The time now is 08:21 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.