對(duì)文件夾設(shè)置2
發(fā)表時(shí)間:2024-06-06 來源:明輝站整理相關(guān)軟件相關(guān)文章人氣:
[摘要]對(duì)文件的操作--建立移動(dòng)刪除文件夾 對(duì)文件夾的建立 <% dim objfso set objfso=server.createobject("scripting,filesystemobject") objfso.createfolder(server.mappath(...
對(duì)文件的操作--建立移動(dòng)刪除文件夾
對(duì)文件夾的建立
<%
dim objfso
set objfso=server.createobject("scripting,filesystemobject")
objfso.createfolder(server.mappath("\c:\newfolder"))
response.write"新文件夾的實(shí)際路為"&server.mappath("\C:\newfolder")
set objfso=nothing
%>
對(duì)文件夾的移動(dòng)
<%
dim objfso
set objfso=server.createobject("scripting,filesystemobject")
if objfso.folderExists(server.mappath("\folder1")) then
objfso.moveFolder.server.mappath("\folder1"),server.mappath("c:\folder2")
else
response.write"floder1文件夾不存在無法移動(dòng)"
end if
set objfso=nothing
%>
對(duì)文件夾的刪除
<
dim objfso
set objfso=server.createobject("scripting,filesystemobject")
if objfso.folderExists(server.mappath("\folder1")) then
objfso.deletefolder server.mappath("\folder1")
else
response.write"文件夾不存在,無法刪除"
end if
set objfso=nothing
>