我想问下asp程序怎么修改文件夹名字呢?有没有范例代码
调用函数的方法<%call fldrename("qdxw01","qdxw02")%>
基本意思即将与程序执行文件在同一目录下的 qdxw01文件夹名称修改为 qdxw02
Function fldrename(nowfld,newfld) nowfld=server.mappath(nowfld) newfld=server.mappath(newfld) Set fso = CreateObject("Scripting.FileSystemObject") if not fso.FolderExists(nowfld) then response.write("需要修改的文件夹路径不正确或文件夹名称输入错误") else if fso.FolderExists(newfld) then response.write("您命名的新文件夹名称已经存在") else fso.CopyFolder nowfld,newfld fso.DeleteFolder(nowfld) end if end if set fso=nothing End Function