C/C++ Code复制内容到剪贴板
- <%
-
- Name1="原文件名"
- Name2="目标文件名"
-
- if Name1<>"" and Name2<>"" then
-
- Sub RenameFolder(ByVal strFolderPath, ByVal strNewName)
-
- Dim objFileSystem
- Set objFileSystem=Server.CreateObject("Scripting.FileSystemObject")
-
- ' 如果路径不包含冒号, 则认为 strFolderPath 是虚拟路径.
- ' 故调用 Server.MapPath() 方法将此路径转为绝对路径
- If Instr(1,strFolderPath,":")=-1 Then
- strFolderPath=Server.MapPath(strFolderPath)
- End If
-
- Dim objFolder
- Set objFolder=objFileSystem.GetFolder(strFolderPath)
- objFolder.Name=strNewName
-
- Set objFolder=nothing
- Set objFileSystem=nothing
-
- End Sub
-
- RenameFolder Server.MapPath(Name1),Name2
- response.write "已经成功地把 "+Name1+" 更名为 "+Name2+" !"
-
- end if
-
- %>
希望这篇
的文章能够对您有所帮助,如果您觉得这篇网站维护教程有用的话,别忘了推荐给您的朋友哦!如果您有好的经验方法,不妨拿出来和大家一起分享:假如每个人都拿出一个经验,那么我们都将额外的获取一堆他人的经验。
请记住本站永久域名:(黑客防线网安服务器维护方案维护基地)Www.Rongsen.Com.Cn