asp 创建与删除文件与文件夹
2009-11-12 17:15
288 查看
创建文件夹名称"www.236z.com"
<%
Foldertocreate=server.mappath("") &"/cgi-bin/myfiles"
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateFolder(Foldertocreate)
Set fs=nothing
%>
Done
删除文件 www.236z.com
<%
Foldertodelete=server.mappath("") &"/cgi-bin/111cn"
Set fs = CreateObject("Scripting.FileSystemObject")
fs.DeleteFolder(Foldertodelete)
Set fs=nothing
%>
Done
删除文件夹,判断文件存在时再删除.
<%
Foldertodelete=server.mappath("") &"/cgi-bin/myfiles"
Set fs = CreateObject("Scripting.FileSystemObject")
if fs.FolderExists("c:temp") then
fs.DeleteFolder "c:temp"
end if
Set fs=nothing
%>
<%
Foldertocreate=server.mappath("") &"/cgi-bin/myfiles"
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateFolder(Foldertocreate)
Set fs=nothing
%>
Done
删除文件 www.236z.com
<%
Foldertodelete=server.mappath("") &"/cgi-bin/111cn"
Set fs = CreateObject("Scripting.FileSystemObject")
fs.DeleteFolder(Foldertodelete)
Set fs=nothing
%>
Done
删除文件夹,判断文件存在时再删除.
<%
Foldertodelete=server.mappath("") &"/cgi-bin/myfiles"
Set fs = CreateObject("Scripting.FileSystemObject")
if fs.FolderExists("c:temp") then
fs.DeleteFolder "c:temp"
end if
Set fs=nothing
%>
相关文章推荐
- asp.net上传文件并创建文件夹和删除文件
- asp.net创建、删除、移动文件夹 文件
- ASP FSO 检测 创建 删除 文件 文件夹
- asp结合fso实现文件或文件夹创建删除等操作的函数
- asp.net 文件夹和文件的创建、删除
- asp结合fso实现文件或文件夹创建删除等操作的函数
- ASP.NET对文件的操作,创建文件,判断文件是否存在,判断文件是否存在删除文件夹
- asp.net ftp 上传,下载,删除文件,创建文件夹,删除文夹,重命名类
- PHP文件及文件夹操作之创建、删除、移动、复制
- php文件及文件夹操作(创建、删除、移动、复制)
- Java 基础【12】 文件(文件夹) 创建和删除
- 创建、删除文件和文件夹命令
- net8:简易的文件磁盘管理操作二(包括文件以及文件夹的编辑创建删除移动拷贝重命名等)
- ubuntu创建、删除文件及文件夹,强制清空回收站方法
- UFT基础_文件创建读写及文件夹创建删除
- ubuntu创建、删除文件及文件夹,强制清空回收站方法
- ASP.NET中对文件的操作 创建 读取 删除 上传 下载
- Asp.Net 文件操作基类(读取,删除,批量拷贝,删除,写入,获取文件夹大小,文件属性,遍历目录)
- C#文件操作 追加、拷贝、删除、移动文件、创建目录 修改文件名、文件夹名
- java创建文件夹,文件;删除文件夹,文件