无法脚本删除/脚本移动文件夹 [英] cannot script-delete / script-move folders

查看:90
本文介绍了无法脚本删除/脚本移动文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行Windows XP和IIS 5.1并且系统不允许我使用FileSystemObject.DeleteFolder(路径,强制)删除或移动
文件夹或

FileSystemObject.MoveFolder(出发地,目的地)。我允许所有的permitions

那个web文件夹(读取,正确,源代码访问)


我注意到在Windows XP中无法取消选中只读选项任何

文件夹选项。如果取消选中并在下次再次打开

文件夹属性时按OK,将再次选中复选框

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

推荐答案

任何人?
anybody??


如果您发布了一些有用的信息,例如您正在使用的代码以及什么错误

或非预期的行为发生时,您可能会收到回复。 不要让我

删除并没有真正告诉任何人。


-


雷在家

Microsoft ASP MVP

" Apostolis K." < AP ********* @ hotmail.com>在消息中写道

新闻:%2 **************** @ tk2msftngp13.phx.gbl ...
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??



你是对的Ray。我很抱歉。

这是故事

我在Root目录中有2个目录,每个目录里面有1个子目录

他们(共4个目录)


C:\ test1

C:\ test1\test1a

C:\ test2

C:\ test2 \ test2a


有一个名为1.txt的文件。在目录C:\ test1 \ test1a中

当我运行每个代码时,我收到以下错误


错误类型:

Microsoft VBScript运行时(0x800A0046)

权限被拒绝


请注意,我允许Web文件夹的所有权限(读/写等)


代码为:

------ * temp1.asp * ----------------- -----------------------------

<%

设置objFSO = Server.CreateObject(" Scripting.FileSystemOb ject")

set objFolder = objFSO.GetFolder(" C:\ test1 \ test1a")

objFolder.Move" C:\ test2"

%>

------------------ -----------------------------------------------


------ * temp2.​​asp * ------------------------------ ----------------

<%

设置objFSO = Server.CreateObject(" Scripting.FileSystemOb ject")

set objFolder = objFSO.GetFolder(" C:\ test1 \\ \\ test1a")


objFolder.Delete TRUE

%>

----------- -------------------------------------------------- ----


------ * temp3.asp * ----------------------- -----------------------

<%

设置objFSO = Server.CreateObject(" ; Scripting.FileSystemOb ject")

set objFile = objFSO.GetFile(" C:\ test1 \ test1a \\\ ttxt")


objFile.Move" C:\ test2"

%>

------------------- ----------------------------------------------


------ * temp4.asp * ------------------------------- ---------------

<%

设置objFSO = Server.CreateObject(" Scripting.FileSystemOb ject")

set objFile = objFSO.GetFile(" C:\ test1 \ test1a \\ ttxt")

objFile.Delete TRUE
%>

---------------------------------- -------------------------------
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
%>
-----------------------------------------------------------------


这篇关于无法脚本删除/脚本移动文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆